TestSnakeGame is a simple and fun game where you control a snake and try to eat as many carrots as possible without hitting the walls or your own tail.
- Use the WASD keys or the arrows on the screen to move the snake around the screen.
- Eat the orange carrots to grow longer and increase your score.
- Avoid collisions with the walls or your own tail, or the game will end.
- To restart the game: Press R.
- Clone the GitHub repository.
git clone https://github.com/PeTcHeNkA/TestSnakeGame
- Install the dependencies.
npm i
- Review the settings in the start.js file.
var params = {
// The server port and address
port: 8000,
host: "localhost",
// The root directory
root: path.resolve("./"),
file: "index.html",
// Other options
open: false,
ignore: 'scss,my/templates',
wait: 1000,
mount: [['/components', './node_modules']],
logLevel: 0,
middleware: [function(req, res, next) { next(); }]
};
- Start the game.
npm start
