Browse Source

tictactoe: added method to count playing fields

tictactoe
Malte Schellhardt 3 years ago
committed by Lorenz Hohmann
parent
commit
068bed8357
  1. 5
      src/main/java/de/tims/tictactoe/GameLogic.java
  2. 8
      src/test/java/de/tims/tictactoe/GameLogicTest.java

5
src/main/java/de/tims/tictactoe/GameLogic.java

@ -8,4 +8,9 @@ public class GameLogic {
return this.board;
}
public int countFields() {
// TODO Auto-generated method stub
return 9;
}
}

8
src/test/java/de/tims/tictactoe/GameLogicTest.java

@ -33,5 +33,13 @@ class GameLogicTest {
assertArrayEquals(expectedResult, realResult);
}
@Test
void fieldCountTest() {
int expectedResult = 9;
int realResult = game.countFields();
assertEquals(expectedResult, realResult);
}
}
Loading…
Cancel
Save