Professional Documents
Culture Documents
Computer Project
Computer Project
Introduction
Tetris is a Russian tile-matching puzzle video game,
originally designed and programmed by Alexey Pajitnov."Tetriminos"
are game pieces shaped like tetrominoes, geometric shapes composed
of four square blocks each. A random sequence of Tetriminos falls
down the playing field (a rectangular vertical shaft, called the "well" or
"matrix").The objective of the game is to manipulate these Tetriminos,
by moving each one sideways (if the player feels the need) and rotating
it by 90 degree units, with the aim of creating a horizontal line without
gaps. When such a line is created, it disappears, and any block above
the deleted line will fall. As the game progresses, the Tetriminos fall
faster, and the game ends when the stack of Tetriminos reaches the top
of the playing field and no new Tetriminos are able to enter.
Header Files
TIME.H
CCTYPE
FSTREAM
TIMER.H
CMATH
Functions
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
arrmax(int)
arrmin(int)
delay(float)
Code
The code for this program was written in C++ following the current
ISO C++ 11 standards. The IDE used was the MinGW version of
Dev C++ 5.7.1 GCC compiler.
Output
Limitations
Save file cannot be named temp_tetris_sav.dat
Game lags in lower spec systems
Not able to rotate tetriminos at the edge of the arena
Bibliography
Wikipedia (https://en.wikipedia.org/)
Stack Overflow (http://stackoverflow.com/)
http://www.cplusplus.com/
NCERT Class 12 Computer Textbook