Skip to content

BugSplat-Git/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Snake Game

A simple browser-based snake game built with TypeScript, bundled with Webpack, and featuring hot reloading for development.

Features

  • Classic snake gameplay
  • Score tracking
  • Game over screen with restart option
  • Hot module replacement for development

Getting Started

Prerequisites

  • Node.js and npm installed on your system

Installation

  1. Clone the repository or download the source code
  2. Install dependencies:
npm install

Development

To start the development server with hot reloading:

npm run dev

This will open the game in your default browser and automatically reload when you make changes to the source code.

Building for Production

To build the production version:

npm run build

The output will be in the dist directory.

How to Play

  • Use the arrow keys to control the snake
  • Eat the red food to grow and earn points
  • Avoid hitting the walls or yourself
  • Click the "Restart" button to play again after game over

License

ISC

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors