|
@ -14,7 +14,8 @@ class FigureFarmerTest |
|
|
@ParameterizedTest |
|
|
@ParameterizedTest |
|
|
// row (src), col (src), row (dst), col (dst) |
|
|
// row (src), col (src), row (dst), col (dst) |
|
|
@CsvSource({ |
|
|
@CsvSource({ |
|
|
"6, 0, 5, 0" // a2 -> a3 |
|
|
|
|
|
|
|
|
"6, 0, 5, 0", // a2 -> a3 |
|
|
|
|
|
"4, 4, 3, 4" // e4 -> e5 |
|
|
}) |
|
|
}) |
|
|
void whiteFarmerValidDestination(int srcRow, int srcCol, int dstRow, int dstCol) |
|
|
void whiteFarmerValidDestination(int srcRow, int srcCol, int dstRow, int dstCol) |
|
|
{ |
|
|
{ |
|
@ -50,15 +51,4 @@ class FigureFarmerTest |
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
assertFalse(f.moveAllowed(src, dst, field)); |
|
|
assertFalse(f.moveAllowed(src, dst, field)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void checkMoveWithValidDestinationVar2() // Bauer (w) steht in der Mitte vom Feld und geht 1 nach oben |
|
|
|
|
|
{ |
|
|
|
|
|
int src = Figure.fieldLength * 4 + 4; |
|
|
|
|
|
int dst = Figure.fieldLength * 3 + 4; |
|
|
|
|
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
|
|
|
assertTrue(f.moveAllowed(src, dst, field)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |