@ -10,6 +10,11 @@ public class FigureBishop extends Figure
return false;
}
if (dst - src == 1) // 1 Feld nach rechts
{
return super.moveAllowed(src, dst, field);
@ -17,4 +17,13 @@ class FigureBishopTest
assertFalse(f.moveAllowed(src, dst,
new Figure[Figure.fieldLength * Figure.fieldLength]));
@Test
void checkInvalidMovesBishopRight()
Figure f = new FigureBishop();
assertFalse(f.moveAllowed(45, 46,
new Figure[64]));