-
Notifications
You must be signed in to change notification settings - Fork 0
/
I.pde
65 lines (56 loc) · 863 Bytes
/
I.pde
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
class I extends Piece {
I() {
super();
piece = new byte[][][] {
{
{1, 1, 1, 1}
},
{
{1},
{1},
{1},
{1}
},
{
{1, 1, 1, 1}
},
{
{1},
{1},
{1},
{1}
}
};
}
int getWidth() {
int width = 0;
switch (angle) {
case ANGLE_0:
case ANGLE_180:
width = 4;
break;
case ANGLE_90:
case ANGLE_270:
width = 1;
break;
}
return width;
}
int getHeight() {
int height = 0;
switch (angle) {
case ANGLE_0:
case ANGLE_180:
height = 1;
break;
case ANGLE_90:
case ANGLE_270:
height = 4;
break;
}
return height;
}
int getSpawnPosition() {
return 3;
}
}