This project is a simple Tetris game implemented in JavaScript. It allows players to control falling Tetris pieces and earn points by completing rows. Once the pieces stack up to the top, the game is over.
This is a SIMPLE version of tetris, for coding beginner to understand the stuctures with some fun details
- Controls:
- Use the arrow keys to move the falling piece left, right, or down.
- Press the space bar to rotate the piece.
- Fill complete rows to clear them and earn points.
- Player name input:
- When prompted, enter your name to personalize the game.
- If the name entered is "Justin" or "justin", the player name will be set as "Boyfriend!".
- Here's a fun interating setting if you want to plant an easter egg for your friends, please just edit "Justin" and "Boyfriend"
- Game Over:
- When the pieces stack up to the top, the game ends.
- The final score is displayed.
- Restart:
- Click the "Start Game" button to begin a new game.
- Click the "Restart" button after the game is over to restart the game.
- Open the
index.html
file in a web browser. - Click the "Start Game" button to begin the game.
- Use the arrow keys to control the falling Tetris pieces.
- Press the space bar to rotate the piece.
- Fill complete rows to clear them and earn points.
- Once the pieces stack up to the top, the game is over.
- Click the "Restart" button to start a new game.
index.html
: The main HTML file that displays the game interface and includes JavaScript file.tetris.js
: The JavaScript file containing the game logic and functionality.
No external dependencies are required to run this project.
This project is compatible with modern web browsers.
This Tetris game is created by Jamie.
Feel free to enjoy the game and have fun playing Tetris!