|
@ -10,7 +10,7 @@ class FigureFarmerTest |
|
|
@Test |
|
|
@Test |
|
|
void whiteFarmerValidDestination() |
|
|
void whiteFarmerValidDestination() |
|
|
{ |
|
|
{ |
|
|
Figure f = new FigureFarmer(0); |
|
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
assertTrue(f.moveAllowed(Figure.fieldLength * 6 + 0, |
|
|
assertTrue(f.moveAllowed(Figure.fieldLength * 6 + 0, |
|
|
Figure.fieldLength * 5 + 0, |
|
|
Figure.fieldLength * 5 + 0, |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
@ -19,7 +19,7 @@ class FigureFarmerTest |
|
|
@Test |
|
|
@Test |
|
|
void whiteFarmerInvalidDestinationDown() // statt nach "oben" wird nach "unten" gegangen |
|
|
void whiteFarmerInvalidDestinationDown() // statt nach "oben" wird nach "unten" gegangen |
|
|
{ |
|
|
{ |
|
|
Figure f = new FigureFarmer(0); |
|
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, |
|
|
Figure.fieldLength * 7 + 0, |
|
|
Figure.fieldLength * 7 + 0, |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
@ -28,7 +28,7 @@ class FigureFarmerTest |
|
|
@Test |
|
|
@Test |
|
|
void whiteFarmerInvalidDestinationUp() // mehr als 1 Schritt nach "oben" |
|
|
void whiteFarmerInvalidDestinationUp() // mehr als 1 Schritt nach "oben" |
|
|
{ |
|
|
{ |
|
|
Figure f = new FigureFarmer(0); |
|
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 6 + 0, |
|
|
Figure.fieldLength * 4 + 0, |
|
|
Figure.fieldLength * 4 + 0, |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
@ -37,7 +37,7 @@ class FigureFarmerTest |
|
|
@Test |
|
|
@Test |
|
|
void checkMoveWithValidDestinationVar2() // Bauer (w) steht in der Mitte vom Feld und geht 1 nach oben |
|
|
void checkMoveWithValidDestinationVar2() // Bauer (w) steht in der Mitte vom Feld und geht 1 nach oben |
|
|
{ |
|
|
{ |
|
|
Figure f = new FigureFarmer(0); |
|
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
assertTrue(f.moveAllowed(Figure.fieldLength * 4 + 4, |
|
|
assertTrue(f.moveAllowed(Figure.fieldLength * 4 + 4, |
|
|
Figure.fieldLength * 3 + 4, |
|
|
Figure.fieldLength * 3 + 4, |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
@ -46,7 +46,7 @@ class FigureFarmerTest |
|
|
@Test |
|
|
@Test |
|
|
void whiteFarmerInvalidDestinationDownVar2() // Bauer (w) steht in der Mitte vom Feld und geht 1 nach unten |
|
|
void whiteFarmerInvalidDestinationDownVar2() // Bauer (w) steht in der Mitte vom Feld und geht 1 nach unten |
|
|
{ |
|
|
{ |
|
|
Figure f = new FigureFarmer(0); |
|
|
|
|
|
|
|
|
Figure f = new FigureFarmer(FigureFarmer.Color.White); |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 4 + 4, |
|
|
assertFalse(f.moveAllowed(Figure.fieldLength * 4 + 4, |
|
|
Figure.fieldLength * 5 + 4, |
|
|
Figure.fieldLength * 5 + 4, |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|
new Figure[Figure.fieldLength * Figure.fieldLength])); |
|
|