Browse Source

4gewinnt: added calcScore method

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

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

@ -146,4 +146,8 @@ public class Logic {
}
return false;
}
public int calcScore(int[][] playfield, int player) {
return 0;
}
}

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

@ -65,6 +65,17 @@ class LogicTest {
assertEquals(expectedResult, realResult);
}
@Test
void calcScoreTest() {
int[][] playfield = new int[6][6];
int player = 1;
int expectedResult = 0;
int realResult = testObj.calcScore(playfield, player);
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