Skip to content

This is a simple tetris game built using Javascript. It was created following a tutorial. It can be played online and follows the standard rules of Tetris. The game is over when 60 points are reached or if the tetrominoes reach the top of the board.

Notifications You must be signed in to change notification settings

defoebrand/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris

screenshot

This is a tetris game built following this tutorial from freeCodeCamp

Built With

  • HTML
  • CSS
  • Javascript
  • Ubuntu
  • Atom

Live Demo

Play this game here!

Setup

  1. Clone this repository with git clone https://github.com/defoebrand/tetris.git using a terminal or command line.
  2. Direct your browser to ~/tetris/index.html to view the app.

Rules of the game

Rule 1: The board is arranged in a grid based system while tetrominoes fall towards the bottom of the board.

Rule 2: Players must arrange tetrominoes in such a way as to create one solid line of filled spaces from the left bound to the right to get 5 points.

Rule 3: Reach 60 points before the tetrominoes stack to the top of the screen or lose the game.

How to play

Step 1: After pressing start a tetromino will begin falling and a previewed tetromino will appear above the board.

Step 2: Players must use the left and right arrow keys to position the tetromino horizontally

Step 3: Players must press the spacebar in order to rotate the tetromino clockwise.

Step 4: Continue this process to align the tetrominoes and fill all available spaces horizontally.

Step 4: Once a line has been created horizontally, that line will disappear and the tetrominoes will fall down one level.

Step 5: The game will either declare a winner at 60 points or end the game if the tetrominoes stack to the top of the screen.

Author

👤 Defoe Brandon

Repository Contents

ruby folder: This folder includes files to mark the beginning of a Tetris version built using Ruby and Ruby-2D. Future updates will contain this version in completion.

🤝 Contributing

Contributions, issues and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

freeCodeCamp tutorials at freeCodeCamp YouTube

📝 License

This project is MIT licensed.

About

This is a simple tetris game built using Javascript. It was created following a tutorial. It can be played online and follows the standard rules of Tetris. The game is over when 60 points are reached or if the tetrominoes reach the top of the board.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published