This project is a classic Snake Game built using React. The game allows users to control a snake to eat food and grow in size while avoiding collisions with the walls or itself.
These instructions will help you set up and run the project on your local machine for development and testing purposes.
Make sure you have the following software installed on your machine:
- Node.js
- npm (Node Package Manager)
-
Clone the repository to your local machine:
git clone https://github.com/your-username/snake-game.git
-
Navigate to the project directory:
cd snake-game
- Install the project dependencies:
npm install
Running the Game
To start the game in development mode, run the following command:
npm start
Building for Production
To build the app for production, run the following command:
npm run build
The project directory structure is as follows:
.env
.gitignore
.prettierignore
jsconfig.json
package.json
public/
index.html
manifest.json
robots.txt
README.md
src/
App.css
App.js
App.test.js
classes/
LinkedList.js
Queue.js
components/
BoardCell/
BoardCell.js
GameBoard/
GameBoard.js
ScoreBoard/
ScoreBoard.js
SnakeHeader/
SnakeHeader.js
fonts/
snake.ttf
img/
index.css
index.js
reportWebVitals.js
setupTests.js
sounds/
utils.css