Skip to content

RealAbdurRehman/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game in React

A simple Snake Game built with React. The game allows the player to control a snake to eat food, grow in size, and avoid collisions with the walls or itself. The objective is to achieve the highest score possible by eating as much food as possible without dying.

Features

  • Playable Snake Game with arrow keys for movement (or W, A, S, D)
  • Increasing difficulty as the snake grows
  • Keeps track of the player's score
  • Responsive and mobile-friendly
  • Different screens: Start Game, Gameplay, and Game Over

Gameplay

  • Use the arrow keys or W, A, S, D to control the snake.
  • The snake grows longer each time it eats food (represented as a small square).
  • The game ends when the snake collides with the walls or itself.
  • The score increases with each piece of food consumed.

Technologies Used

  • React: JavaScript library for building the user interface.
  • CSS: For styling the game board and elements.
  • JavaScript: For game logic and handling the snake's movement and collisions.

Screenshots

1. Start Game Screen

This is the screen that shows when you first open the game. Click to start.

Demo

2. Gameplay

This is the main gameplay screen where you control the snake.

Demo

3. Death Screen 1

The game over screen after the player dies (first instance).

Demo

4. Death Screen 2

Another variation of the death screen, showing the final score.

Demo

About

A Snake game where you eat orbs as a snake to grow and increase your score, without colliding with anything.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published