An implementation of the game Snake inspired by the classic Connect Four game and this gif!
This is the sourcecode for the connect snake game at blog.brahmlower.io/connect-snake-game. Controls are arrow keys, and Space will start/pause.
You can install connect-snake via npm:
npm install git+https://github.com/brahmlower/connect-snake.git
The example directory shows the component usage, though there isn't much configuration available at this time. A good deal of energy was put into abstracting the display image from the game itself, so it should be pretty easy to implement other games like tetris or pong.
- clone repo
- npm install
- profit?
You may need to set the following:
export NODE_OPTIONS=--openssl-legacy-provider
Then start storybook:
npm run storybook
Build the package first, then install the dependencies in the example:
npm run build
npm pack
cd example
rm -rf node_modules
npm install
npm start
If you found a horrible bug or would like to improve this project in some way, feel free to open a pull request or Issue. If you have questions but are less comfortable posting in a public forum, feel free to email me!