Skip to content

frye/snakes-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

This is a simple Snake game implemented in JavaScript. The game allows the player to control a snake and eat candies to grow longer. The objective is to avoid colliding with the snake's own body.

Project Structure

The project has the following files:

  • script.js: This file contains the JavaScript code for the Snake game. It includes the implementation of the game logic, snake movement, food generation, and candy generation. It exports the necessary functions and classes to run the game.

  • index.html: This file is the HTML file that serves as the entry point of the game. It includes the necessary HTML structure and links to the CSS and JavaScript files.

  • style.css: This file contains the CSS styles for the game. It defines the appearance and layout of the game elements.

How to Run the Game

To run the Snake game, follow these steps:

  1. Clone the repository or download the project files.

  2. Open the index.html file in a web browser.

How to Play the Game

The game starts immediately when you load the page. The snake moves in the direction of the arrow keys. The goal of the game is to eat as many candies as possible without colliding with the snake's own body.

Each time the snake eats an apple, it grows longer and the game speed increases. The game ends when the snake collides with its own body.

Enjoy playing the Snake game!

About

Starter code to work with copilot chat.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors