A Tetris Attack clone, built on Deno, with Bot support.
This project is a Tetris Attack clone implemented using Deno. The game includes features such as random tile generation, scoring, gravity effects, and a bot to play the game.
The game logic is primarily found in the game.ts
file, which includes the game configuration, grid handling, cursor movements, and scoring logic. The game is run as a web server that serves the game files and handles game logic requests.
- Grid Management: Handles the game grid, including tile placement and clearing.
- Cursor Movements: Allows users to move a cursor to swap tiles.
- Scoring: Implements scoring based on tile matches.
- Bot: An optional bot that uses a Q-learning approach to play the game.
To run the project, you need to have Deno installed. Follow the steps below to start the game:
-
Clone the repository:
git clone https://github.com/sbmsr/deno-tetris-attack.git cd deno-tetris-attack
-
Start the development server:
deno task dev
-
Open your browser and navigate to
http://localhost:8000
.
To set up the development environment, follow these steps:
-
Ensure you have Deno installed. You can install Deno from the official website.
-
Clone the repository and navigate to the project directory:
git clone https://github.com/sbmsr/deno-tetris-attack.git cd deno-tetris-attack
-
Start the development server:
deno task dev
-
Make your changes and the server will automatically reload with your updates.