|
@ -34,6 +34,7 @@ class FigureTest |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, Figure.fieldLength * 6 + 0, new int[Figure.fieldLength * Figure.fieldLength])); |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, Figure.fieldLength * 6 + 0, new int[Figure.fieldLength * Figure.fieldLength])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// weißer Bauer |
|
|
@Test |
|
|
@Test |
|
|
void checkMoveWithValidDestination() |
|
|
void checkMoveWithValidDestination() |
|
|
{ |
|
|
{ |
|
@ -54,4 +55,11 @@ class FigureTest |
|
|
Figure f = new Figure(); |
|
|
Figure f = new Figure(); |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, Figure.fieldLength * 4 + 0, new int[Figure.fieldLength * Figure.fieldLength])); |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, Figure.fieldLength * 4 + 0, new int[Figure.fieldLength * Figure.fieldLength])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void checkMoveWithValidDestinationVar2() // Bauer (w) steht in der Mitte vom Feld und geht 1 nach oben |
|
|
|
|
|
{ |
|
|
|
|
|
Figure f = new Figure(); |
|
|
|
|
|
assertTrue(f.moveAllowed(Figure.fieldLength * 4 + 4, Figure.fieldLength * 3 + 4, new int[Figure.fieldLength * Figure.fieldLength])); |
|
|
|
|
|
} |
|
|
} |
|
|
} |