Skip to content

PatrikZitting/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

A classic timeless Snake game implemented in TypeScript.

Table of Contents

Introduction

This project is a simple implementation of the classic Snake game using TypeScript. The game features a snake that moves around the game board, eating food to grow longer. The objective is to grow the snake as long as possible without colliding with the walls or itself.

Screenshots

Snake1 Snake2

Game Features

  • Classic Snake gameplay.
  • Responsive game board.
  • Simple controls using arrow keys.
  • Collision detection with walls and self.
  • Randomly generated food.

Getting Started

To play the game, follow these steps:

  1. Clone this repository to your local machine: git clone https://github.com/PatrikZitting/Snake.git

  2. Navigate to the project directory: cd snake-main

  3. Install the project dependencies: npm install

  4. Start the game: npm start

  5. Open in browser: Navigate to http://localhost:3000/

Press the "Enter" key to begin playing. Use the arrow keys to control the snake and enjoy the game!

Game Controls

Use the arrow keys (Up, Down, Left, Right) to control the snake's direction. Press the "Enter" key to start the game.

Game Score

Game score is displayed on top of the game (current score and high score). NOTE: Scores are stored only in-session, so if you refresh the page, the high score is also reset!

About

A classic timeless Snake game implemented in TypeScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published