-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtetromino_o.e
42 lines (33 loc) · 883 Bytes
/
tetromino_o.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
note
description : "The O {TETROMINO}."
author : "Louis Marchand"
date : "July 19 2012"
revision : "1.0"
class
TETROMINO_O
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,2,block_width,block_height,rotation)
end
feature {NONE} -- Initialisation
blocks_positions_init:ARRAY[TUPLE[row,column:INTEGER]]
-- <Precursor>
once
Result:=<< [1,2],[1,3],[2,3],[2,2],
[1,3],[2,3],[2,2],[1,2],
[2,3],[2,2],[1,2],[1,3],
[2,2],[1,2],[1,3],[2,3]>>
end
end