|
|
@ -25,11 +25,16 @@ class FigureFarmerTest |
|
|
|
assertTrue(f.moveAllowed(src, dst, field)); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void whiteFarmerInvalidDestinationDown() // statt nach "oben" wird nach "unten" gegangen |
|
|
|
// weißer Bauer |
|
|
|
@ParameterizedTest |
|
|
|
// row (src), col (src), row (dst), col (dst) |
|
|
|
@CsvSource({ |
|
|
|
"6, 0, 7, 0" // a2 -> a1 |
|
|
|
}) |
|
|
|
void whiteFarmerInvalidDestinationDown(int srcRow, int srcCol, int dstRow, int dstCol) // statt nach "oben" wird nach "unten" gegangen |
|
|
|
{ |
|
|
|
int src = Figure.fieldLength * 6 + 0; |
|
|
|
int dst = Figure.fieldLength * 7 + 0; |
|
|
|
int src = Figure.fieldLength * srcRow + srcCol; |
|
|
|
int dst = Figure.fieldLength * dstRow + dstCol; |
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
|
assertFalse(f.moveAllowed(src, dst, field)); |
|
|
|