This is a simple implementation of the classic Snake game using React.
- 10x10 game board
- Snake movement using arrow keys
- Food generation
- Collision detection
- Score tracking
These instructions will help you set up and run the Snake game on your local machine.
- Node.js
- npm
-
Clone the repository using web URL, SSH or the official GitHub CLI.
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
to see the game in action.
- Use the arrow keys to control the direction of the snake.
- Eat the red food to grow the snake and increase your score.
- Avoid running into the walls or the snake's own body, which will end the game.
- React
- CSS
- Inspired by the classic Snake game.
- Created as a fun project to learn and practice React.