Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.04 KB

README.md

File metadata and controls

58 lines (36 loc) · 1.04 KB

Snake Game

This is a simple implementation of the classic Snake game using React.

Features

  • 10x10 game board
  • Snake movement using arrow keys
  • Food generation
  • Collision detection
  • Score tracking

Getting Started

These instructions will help you set up and run the Snake game on your local machine.

Prerequisites

  • Node.js
  • npm

Installation

  1. Clone the repository using web URL, SSH or the official GitHub CLI.

  2. Install the dependencies:

    npm install

Running the Game

  1. Start the development server:

    npm run dev
  2. Open your browser and navigate to http://localhost:5173 to see the game in action.

How to Play

  • 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.

Technologies Used

  • React
  • CSS

Acknowledgments

  • Inspired by the classic Snake game.
  • Created as a fun project to learn and practice React.