|
@ -199,6 +199,14 @@ class LogicTest { |
|
|
assertEquals(testObj.getBoardSize() - 2, testObj.getFreePlace(0)); |
|
|
assertEquals(testObj.getBoardSize() - 2, testObj.getFreePlace(0)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void getFreePlaceTestWithAnyField() { |
|
|
|
|
|
testObj.setField(1, testObj.getBoardSize() - 1, 0); |
|
|
|
|
|
testObj.setField(1, testObj.getBoardSize() - 2, 0); |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(testObj.getBoardSize() - 3, testObj.getFreePlace(0)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private static Stream<Arguments> playfieldResults() { |
|
|
private static Stream<Arguments> playfieldResults() { |
|
|
int[][] playfield1 = {{0, 0, 0, 0, 0, 0}, |
|
|
int[][] playfield1 = {{0, 0, 0, 0, 0, 0}, |
|
|
{0, 0, 0, 0, 0, 0}, |
|
|
{0, 0, 0, 0, 0, 0}, |
|
|