Browse Source

initial creation of "Game" class

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

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

@ -0,0 +1,11 @@
package de.fd.fh;
public class Game
{
public Figure[] mField;
public void initNewGame()
{
mField = new Figure[64];
}
}

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

@ -0,0 +1,18 @@
package de.fd.fh;
import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.*;
class GameTest
{
@Test
void newGameInitializationCorrectField()
{
Game g = new Game();
g.initNewGame();
assertEquals(Figure.fieldLength * Figure.fieldLength, g.mField.length);
}
}
Loading…
Cancel
Save