Skip to content

This project is a super simple Tetris game implemented in JavaScript.

Notifications You must be signed in to change notification settings

Jamieren/Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Tetris

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.

Important acknowledgement

This is a SIMPLE version of tetris, for coding beginner to understand the stuctures with some fun details

Features

  • 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.

Getting Started

  1. Open the index.html file in a web browser.
  2. Click the "Start Game" button to begin the game.
  3. Use the arrow keys to control the falling Tetris pieces.
  4. Press the space bar to rotate the piece.
  5. Fill complete rows to clear them and earn points.
  6. Once the pieces stack up to the top, the game is over.
  7. Click the "Restart" button to start a new game.

File Structure

  • 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.

Dependencies

No external dependencies are required to run this project.

Compatibility

This project is compatible with modern web browsers.

Acknowledgements

This Tetris game is created by Jamie.

Feel free to enjoy the game and have fun playing Tetris!

About

This project is a super simple Tetris game implemented in JavaScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published