@ -2,9 +2,11 @@ package de.fd.fh;
public class Figure
{
public static final int fieldSize = 64;
public boolean moveAllowed(int src, int dst, int[] field)
if (field.length == 8*8)
if (field.length == fieldSize)
return true;
}
@ -24,6 +24,6 @@ class FigureTest
void checkMoveWithInvalidFieldCorrect() // Feldgröße sollte 8*8 betragen
Figure f = new Figure();
assertTrue(f.moveAllowed(0,0, new int[8*8]));
assertTrue(f.moveAllowed(0,0, new int[Figure.fieldSize]));