@ -6,6 +6,11 @@ public class Figure
public boolean moveAllowed(int src, int dst, int[] field)
{
if (src == dst)
return false;
}
if (field.length == fieldSize)
return true;
@ -26,4 +26,11 @@ class FigureTest
Figure f = new Figure();
assertTrue(f.moveAllowed(48,40, new int[Figure.fieldSize]));
@Test
void checkMoveWithoutNewDestination()
assertFalse(f.moveAllowed(48,48, new int[Figure.fieldSize]));