The basic web template for the game like game board snake and food is built using HTML/CSS. The Logic of the game like movement of snake, expansion rate of snake, speed of snake, position of food all this is devloped in VanillaJS
- [HTML/CSS]
- [VanillaJS]
To get a local copy up and running follow these simple example steps.
You need to have npm installed on your system.
- Clone the repo
git clone https://github.com//sahil-rawat/snakegame_js.git
- Install NPM packages
npm install
- Run the server.
npm start
You can set the speed and expansion rate according to your need and start playing using the up down left right arrows.
The speed here is the speed by which the snake will be moving. The expansion rate defines the no. of segments to be added whenever the snake will eat the food