A simple block puzzle game implemented in TypeScript and HTML5 Canvas.
- Classic block puzzle gameplay
- Keyboard controls for moving, rotating, and dropping pieces
- Score tracking
- Preview of the next piece
- Arrow Left (
←): Move the current piece left - Arrow Right (
→): Move the current piece right - Arrow Up (
↑): Rotate the current piece - Arrow Down (
↓): Perform a hard drop (instantly drop the piece to the bottom)
-
Clone the repository or download the source code.
git clone <repository-url> cd BlockPuzzleGame_TypeScript
-
Install dependencies.
npm install
-
Start the development server.
npm run dev
-
Open your browser and navigate to the URL provided by the development server (usually
http://localhost:5173).
To build the project for production, run:
npm run buildThe output files will be located in the dist directory.
To preview the production build locally, run:
npm run previewindex.html: The main HTML file for the game.src/main.ts: The main TypeScript file containing the game logic.src/style.css: The CSS file for styling the game.tsconfig.json: TypeScript configuration file..gitignore: Git ignore file.
This project is for educational purposes and does not include a license. Feel free to modify and use it as you like.

