Browse Source

initial placement black rook h8

feat-figureMovement
JD 4 years ago
parent
commit
b8a1cbb7c8
  1. 1
      fh.fd.ci.client/src/main/java/de/fd/fh/Game.java
  2. 8
      fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java

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

@ -37,6 +37,7 @@ public class Game
} }
mField[Figure.fieldLength * 0 + 0] = new FigureRook(); // schwarzer Turm a8 mField[Figure.fieldLength * 0 + 0] = new FigureRook(); // schwarzer Turm a8
mField[Figure.fieldLength * 0 + 7] = new FigureRook(); // schwarzer Turm h8
} }
boolean moveFigure(int src, int dst) boolean moveFigure(int src, int dst)

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

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

Loading…
Cancel
Save