Skip to content

HadasAmar/snake-game-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Snake Game - Two Players

A classic snake game with a twist – two players competing in the same arena!
Each player controls their own snake, aiming to collect as many apples 🍎 as possible while avoiding collisions with walls, themselves, or the opponent's snake.

Features

  • Two-player gameplay on the same computer
  • Collect apples to increase your score
  • Lose if you hit the walls, yourself, or the other snake
  • Simple and minimalist design using Canvas

How to Play?

  1. Player 1 (Green Snake)

    • 🔼 Arrow Up - Move Up
    • 🔽 Arrow Down - Move Down
    • ◀️ Arrow Left - Move Left
    • ▶️ Arrow Right - Move Right
  2. Player 2 (Blue Snake)

    • 🔼 W - Move Up
    • 🔽 S - Move Down
    • ◀️ A - Move Left
    • ▶️ D - Move Right
  3. The game ends when both players reach 3 losses.

🛠️ How to Run the Game?

  1. Make sure you have Node.js installed.
  2. Install dependencies:
    npm install
  3. running:
    npm start

enjoy the game:)

About

A classic snake game with a twist – two players competing in the same arena!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors