-
Notifications
You must be signed in to change notification settings - Fork 1
/
tetromino_s.e
44 lines (33 loc) · 885 Bytes
/
tetromino_s.e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
note
description : "The S {TETROMINO}."
author : "Louis Marchand"
date : "July 19 2012"
revision : "1.0"
class
TETROMINO_S
inherit
TETROMINO
rename
make as make_tetromino
end
create
make,
make_from_other
feature {NONE} -- Initialization
make(l_surface:GAME_SURFACE;block_width,block_height:NATURAL;rotation:BOOLEAN)
-- Initialisation of `Current' using the images on `l_surface' with {BLOCK}
-- of dimension `block_width'x`block_height'.
-- If `rotation' is `True', apply rotation on individual {BLOCK}.
do
make_tetromino(l_surface,4,block_width,block_height,rotation)
end
feature {NONE} -- Initialisation
blocks_positions_init:ARRAY[TUPLE[row,column:INTEGER]]
-- <Precursor>
once
Result:=<< [2,1],[2,2],[1,2],[1,3],
[1,2],[2,2],[2,3],[3,3],
[2,3],[2,2],[3,2],[3,1],
[3,2],[2,2],[2,1],[1,1]>>
end
end