use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testHashCodeDiffX.
@Test
void testHashCodeDiffX() {
OriginalPiece piece1 = new OriginalPiece(new Mino(Piece.I, Rotate.Spawn), 3, 4, 10);
OriginalPiece piece2 = new OriginalPiece(new Mino(Piece.I, Rotate.Left), 2, 4, 10);
assertThat(piece1.hashCode()).isNotEqualTo(piece2.hashCode());
}
use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testEqualsDiffRotate.
@Test
void testEqualsDiffRotate() {
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.equals(piece2)).isFalse();
}
use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testHashCode.
@Test
void testHashCode() {
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.hashCode()).isEqualTo(piece2.hashCode());
}
use of core.mino.Mino in project solution-finder by knewjade.
the class OriginalPieceTest method testHashCodeDiffY.
@Test
void testHashCodeDiffY() {
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.hashCode()).isNotEqualTo(piece2.hashCode());
}
use of core.mino.Mino in project solution-finder by knewjade.
the class MinoRotationTest method kicksRight.
private int[] kicksRight(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().getRightRotate());
return minoRotation.getKicksWithRightRotation(field, mino, after, x, y);
}
Aggregations