@ -5,6 +5,9 @@ public class GameLogic {
private int[][] board;
public GameLogic(int size) {
if (size < 3) {
size = 3;
}
this.board = new int[size][size];
@ -13,7 +16,6 @@ public class GameLogic {
public int countFields() {
// TODO Auto-generated method stub
return this.board[0].length * this.board.length;
@ -52,6 +52,8 @@ class GameLogicTest {
private static Stream<Arguments> testCasesForCountPlayfields() {
return Stream.of(
Arguments.of("1x1 board with too few fields", 1, 9),
Arguments.of("2x2 board with too few fields", 2, 9),
Arguments.of("3x3 board with 9 playfields", 3, 9),
Arguments.of("4x4 board with 16 playfields", 4, 16),
Arguments.of("5x5 board with 25 playfields", 5,25)