snake-game-react
Version:
Classic (and addictive) Snake game - built as a reusable react component.
44 lines (30 loc) • 666 B
Markdown
A classic game, built as reusable react component. Very lightweight, easy to install and get up and running.
Try the demo [here](https://thepetersweeney.com/snake/).
```
npm i snake-game-react --save
```
```
import Snake from 'snake-game-react';
function App() {
return (
<div className="App">
<Snake
color1="#248ec2"
color2="#1d355e"
backgroundColor="#ebebeb"
/>
</div>
);
}
export default App;
```
To match branding, you can input your preferred color scheme.
Props:
1. color1: string
2. color2: string
3. backgroundColor: string
React of course.