From b8a1cbb7c8614e7e8d5cdd6cc92d7c92269ab8f5 Mon Sep 17 00:00:00 2001 From: Julius Dewender Date: Sun, 31 Jan 2021 18:12:32 +0100 Subject: [PATCH] initial placement black rook h8 --- fh.fd.ci.client/src/main/java/de/fd/fh/Game.java | 1 + fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/fh.fd.ci.client/src/main/java/de/fd/fh/Game.java b/fh.fd.ci.client/src/main/java/de/fd/fh/Game.java index 27d65fc..bbe8dba 100644 --- a/fh.fd.ci.client/src/main/java/de/fd/fh/Game.java +++ b/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 + 7] = new FigureRook(); // schwarzer Turm h8 } boolean moveFigure(int src, int dst) diff --git a/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java b/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java index a57f3a1..f680a43 100644 --- a/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java +++ b/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()); } + @Test + void newGameInitializationFigurePositionsRook2() + { + // schwarzer Turm h8 + assertEquals(new FigureRook().getClass(), + g.mField[Figure.fieldLength * 0 + 7].getClass()); + } + @Test void moveFarmerWhite() // weißer Bauer ganz links um ein Feld noch vorne bewegen {