Skip to content

AkarshGupta4/SnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game (HTML, CSS, JS, Python server)

Setup

  1. Make sure you have Python 3 installed.
  2. Open a terminal in this folder and run:
    python server.py
    
  3. Open your browser and go to http://localhost:8000.

How to Play

  • Use the arrow keys to move the snake.
  • Eat the red food to grow and increase your score.
  • The game ends if you hit the wall or yourself.
  • Click "Restart" to play again.

Enjoy!


Snake Game (React Version)

Setup

  1. Install Node.js from nodejs.org.
  2. Open a terminal in this folder and run:
    npx create-react-app snake-react
    cd snake-react
    
  3. Replace the contents of src/App.js and src/App.css as shown below.
  4. Start the development server:
    npm start
    
  5. The game will open at http://localhost:3000.

How to Play

  • Use the arrow keys to move the snake.
  • Eat the red food to grow and increase your score.
  • The game ends if you hit the wall or yourself.
  • Click "Restart" to play again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors