Skip to content

bansalgokul/Snake-Game-Vanilla-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

This is a classic Snake Game built using vanilla JavaScript. The game allows players to control a snake and navigate it around the game board to eat food and grow longer. The objective is to achieve the highest score possible without colliding with the boundaries of the game board or the snake's own body.

Table of contents

Overview

Demo

Snake Game Demo

Links

Features

  • Control the snake using arrow keys or touch buttons (for mobile devices).
  • Increase your score by eating food and growing longer.
  • Game over when the snake collides with the boundaries or itself.
  • High score tracking to keep track of your best game.

Getting Started

To get started with the Snake Game, follow these steps:

  1. Clone the repository: git clone https://github.com/your-username/snake-game.git
  2. Navigate to the project directory: cd snake-game
  3. Open index.html in your preferred web browser.

Usage

  • Use arrow keys on your keyboard to control the snake's movement.
  • On mobile devices, touch the buttons displayed on the screen to control the snake's movement.
  • The snake will automatically start moving when the game loads.
  • Eat the food to grow longer and earn points.
  • Avoid colliding with the boundaries or the snake's own body.
  • The game ends when the snake collides.

Releases

No releases published

Packages

No packages published