-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSquareBrick.java
More file actions
45 lines (39 loc) · 915 Bytes
/
Copy pathSquareBrick.java
File metadata and controls
45 lines (39 loc) · 915 Bytes
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
/**
* This is the square shaped brick subclass
*/
/**
* @authors P. Cochran and N. Guidry
* @version 1.000
* last modified 10/18/2022
*/
public class SquareBrick extends TetrisBrick
{
public SquareBrick()
{
this.colorNum = 8;
this.position = initPosition();
}
@Override
public int[][] initPosition()
{
position[segmentZero][0] = 0;
position[segmentZero][1] = 5;
position[segmentOne][0] = 0;
position[segmentOne][1] = 6;
position[segmentTwo][0] = 1;
position[segmentTwo][1] = 5;
position[segmentThree][0] = 1;
position[segmentThree][1] = 6;
return position;
}
@Override
public int[][] rotate()
{
return position;
}
@Override
public int[][] unrotate()
{
return position;
}
}