diff --git a/fh.fd.ci.client/src/main/java/de/fd/fh/Figure.java b/fh.fd.ci.client/src/main/java/de/fd/fh/Figure.java index 724aaac..0b5b4d5 100644 --- a/fh.fd.ci.client/src/main/java/de/fd/fh/Figure.java +++ b/fh.fd.ci.client/src/main/java/de/fd/fh/Figure.java @@ -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; } diff --git a/fh.fd.ci.client/src/test/java/de/fd/fh/FigureTest.java b/fh.fd.ci.client/src/test/java/de/fd/fh/FigureTest.java index fdadc15..b764ba1 100644 --- a/fh.fd.ci.client/src/test/java/de/fd/fh/FigureTest.java +++ b/fh.fd.ci.client/src/test/java/de/fd/fh/FigureTest.java @@ -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])); } } \ No newline at end of file