@ -10,7 +10,7 @@ public class FigureBishop extends Figure
return false;
}
if (dst - src == 1) // 1 Feld nach rechts
if (dst - src == 1 || dst - src == 6) // 1 Feld nach rechts
{
@ -29,4 +29,13 @@ class FigureBishopTest
assertFalse(f.moveAllowed(src, dst,
new Figure[Figure.fieldLength * Figure.fieldLength]));
@Test
void checkInvalidMovesBishopRight2()
Figure f = new FigureBishop();
assertFalse(f.moveAllowed(45, 51,
new Figure[64]));