A classic Snake game built with TypeScript.
The objective of the game is to eat as many food pellets as possible without running into yourself or the wall.
- Use the arrow keys to move the snake: โ (up), โ (down), โ (left), โ (right).
- Eat the food pellets to grow longer.
- Avoid running into the wall or the snake's own body.
To run the game locally, follow these steps:
- Clone the repository:
git clone https://github.com/devangtomar/typescript-snake-game.git
- Navigate into the project directory:
cd typescript-snake-game
- Install dependencies:
npm install
- Build the project:
npm run build
- Open
index.html
in your browser to start the game.
- TypeScript
- HTML Canvas
If you want to customize the game, you can modify the following files:
index.ts
: Change the game loop or add new features.
Contributions are welcome! If you find a bug or have an idea for an improvement, please open an issue or submit a pull request.