Browse Source

initial placement black rook a8

feat-figureMovement
Julius Dewender 9 months ago
parent
commit
95af987307
  1. 2
      fh.fd.ci.client/src/main/java/de/fd/fh/Game.java
  2. 9
      fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java

2
fh.fd.ci.client/src/main/java/de/fd/fh/Game.java

@ -35,6 +35,8 @@ public class Game
mField[Game.blackRowFarmer * Figure.fieldLength + j] = new FigureFarmer(FigureFarmer.Color.Black);
}
}
mField[Figure.fieldLength * 0 + 0] = new FigureRook(); // schwarzer Turm a8
}
boolean moveFigure(int src, int dst)

9
fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java

@ -68,6 +68,15 @@ class GameTest
}
}
@Test
void newGameInitializationFigurePositionsRooks()
{
// schwarzer Turm a8
assertEquals(new FigureRook().getClass(),
g.mField[Figure.fieldLength * 0 + 0].getClass());
}
@Test
void moveFarmerWhite() // weißer Bauer ganz links um ein Feld noch vorne bewegen
{

Loading…
Cancel
Save