blob: ec2c248e365c451c9e7782b98504c3f3c4643322 (
plain)
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
|
/*
* Jesse Morgan <jesterpm@u.washington.edu>
*
* TCSS 305 - Autumn 2009
* Tetris Project
* 17 November 2009
*/
package tetris.tests.piece;
import tetris.piece.TetrisPiece;
import tetris.piece.ZPiece;
/**
* JUnit Test for the Z Piece.
*
* @author Jesse Morgan <jesterpm@u.washington.edu>
* @version 1.0 17 November 2009
*/
public class ZPieceTest extends TetrisPieceTest {
/**
* Array of the string representations of various rotations.
*/
private static final String[] ROTATION_STRINGS =
new String[] {"....\nXX..\n.XX.\n....", ".X..\nXX..\nX...\n...."};
@Override
protected int[] getOriginalPoints() {
return new int[] {0, 1, 1, 1, 1, 2, 2, 2}; // Copied from the class.
}
@Override
protected TetrisPiece getPiece(final int the_x, final int the_y) {
return new ZPiece(the_x, the_y);
}
@Override
protected String[] getRotationStrings() {
return ROTATION_STRINGS.clone();
}
}
|