|
|
@ -7,10 +7,14 @@ import static org.junit.jupiter.api.Assertions.*; |
|
|
|
class FigureBishopTest |
|
|
|
{ |
|
|
|
@Test |
|
|
|
void checkInvalidMovesBishop() |
|
|
|
void checkInvalidMovesBishopUpward() |
|
|
|
{ |
|
|
|
Figure f = new FigureBishop(); |
|
|
|
|
|
|
|
assertFalse(f.moveAllowed(45, 37, new Figure[64])); |
|
|
|
int src = Figure.fieldLength * 5 + 5; |
|
|
|
int dst = src - Figure.fieldLength; |
|
|
|
|
|
|
|
assertFalse(f.moveAllowed(src, dst, |
|
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|
|
} |
|
|
|
} |