Skip to content

Latest commit

 

History

History
1211 lines (1121 loc) · 25 KB

File metadata and controls

1211 lines (1121 loc) · 25 KB

learntris test suite

[4/4] basic i/o

establish a command loop and a way to exit

> q
= q : quit
: The 'q' command instructs learntris to quit.
:
: Learntris should not produce any output unless
: explicitly instructed to do so.

establish a way to print the matrix (p)

Matrix is the official term for the 10 × 22 grid of cells.

The playing area is only 10 × 20 but there are 2 extra lines above where new tetriminos form.

> p
# 1 2 3 4 5 6 7 8 9 ( first column, hidden by the #, is 0
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21
> q
= p : print
: The 'p' command instructs learntris to print the state
: of the Matrix, the rectangular array of cells in which
: blocks can appear.
:
: The Matrix is 10 cells wide and 22 cells deep, although
: the top two rows are used only for spawning new Tetraminos.
:
: At the start of the game, the Matrix should be empty.
: The 'p' command should indicate empty cells with the
: '.' character.
:
: Cells should be separated by spaces.
:
: Lines should be separated by the standard end of line
: sequence on your operating system (python's "\n").

establish a way to set the entire matrix (g)

> g
> . . . . . . . . . . # 0
> . . . . . . . . . . # 1
> . . . . . . . . . . # 2
> . . . . . . . . . . # 3
> m m m m m m m m m m # 4
> b b b b b b b b b b # 5
> c c c c c c c c c c # 6
> g g g g g g g g g g # 7
> y y y y y y y y y y # 8
> o o o o o o o o o o # 9
> r r r r r r r r r r # 10
> . . . . . . . . . . # 11
> . . . . . . . . . . # 12
> . . . . . . . . . . # 13
> . . . . . . . . . . # 14
> c . . . . . . . . . # 15
> c . . . . . . . . . # 16
> c . . . . g . . . . # 17
> c . . o . g g . . . # 18
> . . . o . b g . . . # 19
> . m r r o o b y y . # 20
> m m m r r b b y y . # 21
> p
. . . . . . . . . . # 0
. . . . . . . . . . # 1
. . . . . . . . . . # 2
. . . . . . . . . . # 3
m m m m m m m m m m # 4
b b b b b b b b b b # 5
c c c c c c c c c c # 6
g g g g g g g g g g # 7
y y y y y y y y y y # 8
o o o o o o o o o o # 9
r r r r r r r r r r # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
c . . . . . . . . . # 15
c . . . . . . . . . # 16
c . . . . g . . . . # 17
c . . o . g g . . . # 18
. . . o . b g . . . # 19
. m r r o o b y y . # 20
m m m r r b b y y . # 21
> q
= g : given
: The 'g' command instructs learntris to read 22 lines
: of text from the standard input stream, and use the
: characters on these lines to populate some internal
: representation of the Matrix.
:
: The letter 'g' is a mnemonic for the word 'given', as
: in: "given the following matrix...."
:
: The input format should be identical to the output
: produced by the 'p' command.
:
: The letters used in the representation correspond to
: the set of colors used for blocks in the game:
:
: . = empty (black)     b = blue         c = cyan
: g = green             m = magenta      o = orange
: r = red               y = yellow

and a way to clear the matrix (c)

> g
> . . . . . . . . . . # 0
> . . . . . . . . . . # 1
> . . . . . . . . . . # 2
> . . . . . . . . . . # 3
> m m m m m m m m m m # 4
> b b b b b b b b b b # 5
> c c c c c c c c c c # 6
> g g g g g g g g g g # 7
> y y y y y y y y y y # 8
> o o o o o o o o o o # 9
> r r r r r r r r r r # 10
> . . . . . . . . . . # 11
> . . . . . . . . . . # 12
> . . . . . . . . . . # 13
> . . . . . . . . . . # 14
> c . . . . . . . . . # 15
> c . . . . . . . . . # 16
> c. . .  . g . . . . # 17
> c . . o . g g . . . # 18
> . . . o . b g . . . # 19
> . m r r o o b y y . # 20
> m m m r r b b y y . # 21
> c
> p
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21
> q
= c : clear
: The 'c' command instructs learntris to clear the matrix.

[5/5] basic game ideas

establish protocol to set and query the score

score register:

> ?s
0
>q
= ?s : query 's' register (score)
: The '?s' command instructs learntris to display the
: current score as a decimal number.
:
: Initially, the score should be zero.

number of lines register:

> ?n
0
>q
= ?s : query 'n' register (number of cleared lines)
: The '?n' command instructs learntris to display the
: number of lines that have been cleared.
:
: Initially, this number should be zero.

establish the line-clearing mechanic

> ?s
0
> g
> . . . . . . . . . . # 0
> . . . . . . . . . . # 1
> . . . . . . . . . . # 2
> . . . . . . . . . . # 3
> . . . . . . . . . . # 4
> . . . . . . . . . . # 5
> . . . . . . . . . . # 6
> . . . . . . . . . . # 7
> . . . . . . . . . . # 8
> . . . . . . . . . . # 9
> m c r g b y m c o b # 10
> . . . . . . . . . . # 11
> . . . . . . . . . . # 12
> m y o . c r g c m y # 13
> . . . . . . . . . . # 14
> . . . . . . . . . . # 15
> . . . . . . . . . . # 16
> . . . . . . . . . . # 17
> . . . . . . . . . . # 18
> . . . . . . . . . . # 19
> . . . . . . . . . . # 20
> . . . . . . . . . . # 21
> s
> p
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
m y o . c r g c m y # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21
> ?n
1
> ?s
100
> q
= s : step
: The 's' command instructs learntris to execute one step
: of the simulation.
:
: If the matrix contains an unbroken row of blocks, (or
: in other words, a row that contain no empty cells), then
: the 's' command should:
:
: 1. Clear the row (replacing each block with an empty cell)
: 2. Increment the 'n' register by 1.
: 3. Increment the 's' register by 100.
:
: This is only an initial approximation of the scoring
: system, but it will do for now.

[7/7] introduce the tetraminos

The I (cyan)

> I
> t
. . . .
c c c c
. . . .
. . . .
> q
= t,I : drawing and selecting the active tetramino
: At any point in time while the game is running, there
: should be a single 'active' tetramino that the player
: is able to control. Normally these are chosen somewhat
: randomly at runtime, but for automated testing, there
: needs to be some way to set the active tetramino.
:
: There are exactly seven tetraminos and they each have
: specific names used by mathematicians and players of
: video games. This one is called the I tetramino, and
: in the game, it is generally colored cyan.
:
: After issuing the 'I' command, the active tetramino
: should be the 'I' tetramino, and it should be oriented
: horizontally.
:
: In order to verify that the active tetramino is correct,
: the tests need some way to ask what it looks like. This
: is the role of the 't' command: it displays the active
: tetramino.

The O (yellow)

The O spawns in a 4 × 3 grid:

> O
> t
y y
y y
> q
= O : The O Tetramino
: The 2x2 square is called the O tetramino, and in the game
: it should be colored yellow.
:
: Note that while the I tetramino appeared inside a 4x4
: matrix, the O tetramino's matrix is 2x2. This has to do
: with rotation, which we will deal with later.

The Z (red)

The Z and others fit in 3x3 grids

> Z t q
r r .
. r r
. . .
= Z : The Z Tetramino
: The Z Tetramino is colored red and inhabits a 3x3 grid.
:
: Notice that in this test, the commands are all issued on
: a single line. This helps keep the test descriptions
: readable, and also makes it more convienient to type the
: commands interactively by hand.
:
: You do realize you can do that, right? :)
:
: Anyway, from now on, commands may be separated by either
: newlines or spaces, and your implementation may need
: to be adjusted accordingly.

The S (green)

> S t q
. g g
g g .
. . .
= S : The S Tetramino.
: The green S tetramino inhabits a 3x3 grid. It is a mirror image of the Z.

The J (blue)

> J t q
b . .
b b b
. . .
= J : The J Tetramino
: The J tetramino is blue and inhabits a 3x3 matrix. Its default
: orientation is rotated 90 degrees counter clockwise.

The L (orange)

> L t q
. . o
o o o
. . .
= L : The L Tetramino
: The L tetramino is a mirror image of the J. It is colored orange.

The T (magenta)

> T t q
. m .
m m m
. . .
= T : The T Tetramino
: The T is is colored magenta and spawns upside down in a 3x3 matrix.

[7/7] introduce (simplified) super rotation system

Clockwise only. No wall-kicks. For each test, four rotations should bring it back to the staring position.

The I (cyan)

> I ) t
. . c .
. . c .
. . c .
. . c .
> ) t
. . . .
. . . .
c c c c
. . . .
> ) t
. c . .
. c . .
. c . .
. c . .
> ) t q
. . . .
c c c c
. . . .
. . . .

The O (yellow)

The O looks the same in all orientations.

> O ) t
y y
y y
> ) t
y y
y y
> ) t
y y
y y
> ) t q
y y
y y

The Z (red)

The Z and others fit in 3x3 grids

> Z t
r r .
. r r
. . .
> ) t
. . r
. r r
. r .
> ) t
. . .
r r .
. r r
> ) t q
. r .
r r .
r . .

The S (green)

> S t ; ) t ; ) t ; ) t q
. g g
g g .
. . .

. g .
. g g
. . g

. . .
. g g
g g .

g . .
g g .
. g .

The J (blue)

> J t ; ) t ; ) t ; ) t q
b . .
b b b
. . .

. b b
. b .
. b .

. . .
b b b
. . b

. b .
. b .
b b .

The L (orange)

> L t ; ) t ; ) t ; ) t q
. . o
o o o
. . .

. o .
. o .
. o o

. . .
o o o
o . .

o o .
. o .
. o .

The T (magenta)

> T t ; ) t ; ) t ; ) t ; q
. m .
m m m
. . .

. m .
. m m
. m .

. . .
m m m
. m .

. m .
m m .
. m .

[4/4] implement movement

[7/7] draw a shape in the matrix at the spawn point.

Use upper case letters.

the O

> cOPq
. . . . Y Y . . . . #  0
. . . . Y Y . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

the L

> cLPq
. . . . . O . . . . #  0
. . . O O O . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

the J

> cJPq
. . . B . . . . . . #  0
. . . B B B . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

the Z

> cZPq
. . . R R . . . . . #  0
. . . . R R . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

the S

> cSPq
. . . . G G . . . . #  0
. . . G G . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

the I

> cIPq
. . . . . . . . . . #  0
. . . C C C C . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

the T

> cTPq
. . . . M . . . . . #  0
. . . M M M . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

[3/3] basic left/right/down movement ( < v > )

<

> cT<Pq
. . . M . . . . . . #  0
. . M M M . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

>

> cT>Pq
. . . . . M . . . . #  0
. . . . M M M . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

v

> cTvPq
. . . . . . . . . . #  0
. . . . M . . . . . #  1
. . . M M M . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

[6/6] collision detection for the floor and walls

left wall

# nudging <<< should put T on the left wall
> cT<<<P
. M . . . . . . . . #  0
M M M . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21
# nudging again should do nothing:
> <Pq
. M . . . . . . . . #  0
M M M . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

right wall

# nudging >>>> should put T on the right wall
> cT>>>>P
. . . . . . . . M . #  0
. . . . . . . M M M #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21
# nudging again should do nothing:
> >Pq
. . . . . . . . M . #  0
. . . . . . . M M M #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

it changes based on the orientation, though

> T ( >>>> > Pq
. . . . . . . . . M #  0
. . . . . . . . M M #  1
. . . . . . . . . M #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . . . . . . . # 20
. . . . . . . . . . # 21

floor

> cT vvvv vvvv vvvv vvvv vvvv v Pq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . M . . . . . # 20
. . . M M M . . . . # 21

hard drop to floor (V)

> TVpq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . m . . . . . # 20
. . . m m m . . . . # 21

hard drop to floor - rotated

> T)V pq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . m . . . . . # 19
. . . . m m . . . . # 20
. . . . m . . . . . # 21

[4/4] collision detection for other blocks

plain drop

> TV ZV pq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . r r . . . . . # 18
. . . . r r . . . . # 19
. . . . m . . . . . # 20
. . . m m m . . . . # 21

rotated drop

> TV Z)<V pq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . r . . . . . # 18
. . . r r . . . . . # 19
. . . r m . . . . . # 20
. . . m m m . . . . # 21

test collision with blocks on left side

> J ) << V Z ) vvvvvvvvvvvvvvvvv < Pq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . . . . . . #  4
. . . . . . . . . . #  5
. . . . . . . . . . #  6
. . . . . . . . . . #  7
. . . . . . . . . . #  8
. . . . . . . . . . #  9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . R . . . . # 17
. . . . R R . . . . # 18
. . b b R . . . . . # 19
. . b . . . . . . . # 20
. . b . . . . . . . # 21

test collision with blocks on right side

> I)>V I)>V I)>V I)>V T)>vvvv> Pq
. . . . . . . . . . #  0
. . . . . . . . . . #  1
. . . . . . . . . . #  2
. . . . . . . . . . #  3
. . . . . M . . . . #  4
. . . . . M M . . . #  5
. . . . . M c . . . #  6
. . . . . . c . . . #  7
. . . . . . c . . . #  8
. . . . . . c . . . #  9
. . . . . . c . . . # 10
. . . . . . c . . . # 11
. . . . . . c . . . # 12
. . . . . . c . . . # 13
. . . . . . c . . . # 14
. . . . . . c . . . # 15
. . . . . . c . . . # 16
. . . . . . c . . . # 17
. . . . . . c . . . # 18
. . . . . . c . . . # 19
. . . . . . c . . . # 20
. . . . . . c . . . # 21