-
Notifications
You must be signed in to change notification settings - Fork 0
tritris
Parodper edited this page Mar 30, 2019
·
3 revisions
This is a implementation of tetris with 3 block pieces instead of 4.
To know the horizontal and vertical coordinates of a cell subtract 16 from the number until it's below 16.
The number you got its the x coordinates and the number of times you substrated 16 its the y coordenates.
Like this:
Cell = (X - 1) + (Y - 1)*16
-
A: Vertical coordinate for block 1
-
B: Horizontal coordinate for block 1
-
E: Vertical coordinate for block 2
-
F: Horizontal coordinate for block 2
-
G: Vertical coordinate for block 3
-
H: Horizontal coordinate for block 3
-
C: Piece
-
D: Points
-
I: Key pressed
-
K: Flag for ignoring input to move the piece 1 second faster
-
X, Y: Loop variables
-
Z: Number of cells
-
Z[]: Cells
- 0: Get block positions for the piece
- 1: Key handler
- 2: Checks if the piece has reached the bottom or collided with another piece. If yes it saves the blocks to memory and deletes a line if its full.
- 3: Ends the program
0
0
0
000
0
00
00
0
0
00
00
0