Browse Source

4gewinnt: added checkButtons method

4gewinnt
Steffen Helmke 3 years ago
committed by Lorenz Hohmann
parent
commit
d3ec638be0
  1. 4
      src/main/java/de/tims/viergewinnt/ai/Logic.java
  2. 10
      src/test/java/de/tims/viergewinnt/ai/LogicTest.java

4
src/main/java/de/tims/viergewinnt/ai/Logic.java

@ -86,6 +86,10 @@ public class Logic {
return 0;
}
public boolean checkButtons() {
return true;
}
JPanel contentPanel;
JPanel buttonPanel;
JPanel playfieldPanel;

10
src/test/java/de/tims/viergewinnt/ai/LogicTest.java

@ -226,6 +226,16 @@ class LogicTest {
assertEquals(testObj.getBoardSize() - 3, testObj.getFreePlace(0));
}
@Test
void checkButtonsTest() {
testObj.create4gewinntGui();
boolean expectedResult = true;
boolean realResult = testObj.checkButtons();
assertEquals(expectedResult, realResult);
}
private static Stream<Arguments> playfieldResults() {
int[][] playfield1 = {{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},

Loading…
Cancel
Save