use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testEqualsDiffBlock.
@Test
void testEqualsDiffBlock() {
OriginalPiece piece1 = new OriginalPiece(new Mino(Piece.I, Rotate.Spawn), 3, 4, 10);
OriginalPiece piece2 = new OriginalPiece(new Mino(Piece.L, Rotate.Spawn), 3, 4, 10);
assertThat(piece1.equals(piece2)).isFalse();
}
use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testEqualsDiffY.
@Test
void testEqualsDiffY() {
OriginalPiece piece1 = new OriginalPiece(new Mino(Piece.I, Rotate.Spawn), 3, 4, 10);
OriginalPiece piece2 = new OriginalPiece(new Mino(Piece.I, Rotate.Left), 3, 8, 10);
assertThat(piece1.equals(piece2)).isFalse();
}
use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testHashCodeDiffRotate.
@Test
void testHashCodeDiffRotate() {
OriginalPiece piece1 = new OriginalPiece(new Mino(Piece.I, Rotate.Spawn), 3, 4, 10);
OriginalPiece piece2 = new OriginalPiece(new Mino(Piece.I, Rotate.Left), 3, 4, 10);
assertThat(piece1.hashCode()).isNotEqualTo(piece2.hashCode());
}
use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testEquals.
@Test
void testEquals() {
OriginalPiece piece1 = new OriginalPiece(new Mino(Piece.I, Rotate.Spawn), 3, 4, 10);
OriginalPiece piece2 = new OriginalPiece(new Mino(Piece.I, Rotate.Spawn), 3, 4, 10);
assertThat(piece1.equals(piece2)).isTrue();
}
use of core.mino.Mino in project solution-finder by knewjade.
the class MinoRotationTest method kicksLeft.
private int[] kicksLeft(String marks, Mino mino, int x, int y) {
Field field = FieldFactory.createField(marks);
assert field.canPut(mino, x, y);
Mino after = new Mino(mino.getPiece(), mino.getRotate().getLeftRotate());
return minoRotation.getKicksWithLeftRotation(field, mino, after, x, y);
}
Aggregations