Skip to content

djorg83/react-snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-snake-game

NPM version Downloads David GitHub issues license GitHub stars

NPM

React Snake Game

A React component for embedding a game of snake into your app. The game board auto-scales to the size of it's parent element.

Demo

See the demo here!

Usage

You can install through npm:

npm install --save react-snake-game
import React    from 'react';
import ReactDOM from 'react-dom';
import Snake    from 'react-snake-game';

const WRAPPER_STYLE = {
    margin : '30px auto',
    height : 700,
    width  : 700
};

const App = () => (
	<div style={WRAPPER_STYLE}>
        <Snake sound={true} />
	</div>
);

ReactDOM.render(<App />, document.getElementById('root'));

About

Snake game as React Component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published