In process of moving GameConfig into GameState (and making it an immutable singleton for the lifetime of the game).
Still does not understand when or how to resign, or how to play the oppoent's PASS.
This commit is contained in:
@@ -9,7 +9,8 @@ import org.junit.Test;
|
||||
public class CaptureTest {
|
||||
@Test
|
||||
public void testCapture() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B1"));
|
||||
@@ -28,8 +29,8 @@ public class CaptureTest {
|
||||
|
||||
@Test
|
||||
public void testMultiGroupCapture() {
|
||||
GameConfig gameConfig = new GameConfig();
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
@@ -59,7 +60,8 @@ public class CaptureTest {
|
||||
|
||||
@Test
|
||||
public void testCaptureFromEye() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B2"));
|
||||
|
||||
@@ -10,19 +10,19 @@ public class GameScoreTest {
|
||||
|
||||
@Test
|
||||
public void testGetAggregateScoreZero() {
|
||||
GameScore gameScore = new GameScore(0,0,0);
|
||||
assertEquals(GameScore.NORMALIZED_ZERO_SCORE, gameScore.getAggregateScore());
|
||||
GameScore gameScore = new GameScore(0,0,19,0);
|
||||
assertEquals(gameScore.getNormalizedZeroScore(), gameScore.getAggregateScore());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAggregateScoreBlackWinsNoKomi() {
|
||||
GameScore gameScore = new GameScore(25,2,0);
|
||||
GameScore gameScore = new GameScore(25,2,19,0);
|
||||
assertEquals(425, gameScore.getAggregateScore());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAggregateScoreWhiteWinsWithKomi() {
|
||||
GameScore gameScore = new GameScore(10,12,6.5);
|
||||
GameScore gameScore = new GameScore(10,12,19,6.5);
|
||||
assertEquals(362, gameScore.getAggregateScore());
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ public class GameStateTest {
|
||||
|
||||
@Test
|
||||
public void testGetEmptyCoords() {
|
||||
GameState gameState = new GameState(3);
|
||||
GameConfig gameConfig = new GameConfig(3);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.BLACK, "A1");
|
||||
gameState.playStone(Player.WHITE, "A2");
|
||||
|
||||
@@ -15,21 +15,24 @@ public class IllegalMoveTest {
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveOnOwnStone() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
assertFalse(gameState.playStone(Player.BLACK, Action.getInstance("B3")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveOnOtherStone() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
assertFalse(gameState.playStone(Player.WHITE, Action.getInstance("B3")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveNoLiberties() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
@@ -41,7 +44,8 @@ public class IllegalMoveTest {
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveFormsTrappedGroup() {
|
||||
GameState gameState = new GameState(9);
|
||||
GameConfig gameConfig = new GameConfig(9);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A5"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B6"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B7"));
|
||||
@@ -53,7 +57,8 @@ public class IllegalMoveTest {
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveFormsTrappedGroup2() {
|
||||
GameState gameState = new GameState(9);
|
||||
GameConfig gameConfig = new GameConfig(9);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("G1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("H2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("H3"));
|
||||
@@ -72,7 +77,8 @@ public class IllegalMoveTest {
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveSuicide() {
|
||||
GameState gameState = new GameState(3);
|
||||
GameConfig gameConfig = new GameConfig(3);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
@@ -83,7 +89,7 @@ public class IllegalMoveTest {
|
||||
System.out.println("State before move: ");
|
||||
System.out.println(gameState);
|
||||
assertFalse("Play by BLACK at A2 should have failed.",gameState.playStone(Player.BLACK, Action.getInstance("A2")));
|
||||
List<Action> validMoves = new ValidMoveGenerator().getActions(new GameConfig(), gameState, Player.BLACK, ActionGenerator.ALL_ACTIONS);
|
||||
List<Action> validMoves = new ValidMoveGenerator().getActions(gameConfig, gameState, Player.BLACK, ActionGenerator.ALL_ACTIONS);
|
||||
assertEquals(4, validMoves.size());
|
||||
assertTrue(validMoves.contains(Action.PASS));
|
||||
assertTrue(validMoves.contains(Action.getInstance("C1")));
|
||||
|
||||
@@ -8,7 +8,8 @@ import org.junit.Test;
|
||||
public class LegalMoveTest {
|
||||
@Test
|
||||
public void testLegalMove1Liberty() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
assertEquals(Player.WHITE, gameState.getPlayerToMove());
|
||||
gameState.playStone(Player.WHITE, Action.PASS);
|
||||
@@ -26,7 +27,8 @@ public class LegalMoveTest {
|
||||
public void testLegalMove2Liberties() {
|
||||
//Unit test based on illegal move from 9x9 game using MonteCarloUCT
|
||||
//Illegal move detected by gokgs.com server
|
||||
GameState gameState = new GameState(9);
|
||||
GameConfig gameConfig = new GameConfig(9);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("G5"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("G7"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("F6"));
|
||||
|
||||
@@ -6,11 +6,11 @@ import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Test;
|
||||
|
||||
public class StateEvaluatorTest {
|
||||
GameConfig gameConfig = new GameConfig();
|
||||
|
||||
|
||||
@Test
|
||||
public void testScoreEmptyBoard() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
GameScore gameScore = new StateEvaluator(gameConfig)
|
||||
.scoreGame(gameState);
|
||||
|
||||
@@ -20,7 +20,8 @@ public class StateEvaluatorTest {
|
||||
|
||||
@Test
|
||||
public void testScoreFirstMove() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
|
||||
GameScore gameScore = new StateEvaluator(gameConfig)
|
||||
@@ -34,7 +35,8 @@ public class StateEvaluatorTest {
|
||||
|
||||
@Test
|
||||
public void testScoreTiedAtMove2() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A1"));
|
||||
@@ -49,7 +51,8 @@ public class StateEvaluatorTest {
|
||||
|
||||
@Test
|
||||
public void testScoreTerritory() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
@@ -71,7 +74,8 @@ public class StateEvaluatorTest {
|
||||
|
||||
@Test
|
||||
public void testCaptureAggScore() {
|
||||
GameState gameState = new GameState(9);
|
||||
GameConfig gameConfig = new GameConfig(9);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("C2"));
|
||||
@@ -86,7 +90,7 @@ public class StateEvaluatorTest {
|
||||
System.out.println(moveToA1);
|
||||
System.out.println(capAtB3);
|
||||
|
||||
StateEvaluator eval = new StateEvaluator(new GameConfig());
|
||||
StateEvaluator eval = new StateEvaluator(gameConfig);
|
||||
int scoreA1 = eval.scoreGame(moveToA1).getAggregateScore();
|
||||
int scoreB3 = eval.scoreGame(capAtB3).getAggregateScore();
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ import org.junit.Test;
|
||||
public class TerritoryFinderTest {
|
||||
@Test
|
||||
public void testMarkTerritory() {
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
||||
|
||||
@@ -12,13 +12,14 @@ public class AlphaBetaTest {
|
||||
@Test
|
||||
public void testGenmoveAsW() {
|
||||
Policy treeSearch = new AlphaBeta();
|
||||
GameState gameState = new GameState(6);
|
||||
GameConfig gameConfig = new GameConfig(6);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("C2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B2"));
|
||||
|
||||
Action move = treeSearch.getAction(new GameConfig(), gameState, Player.WHITE);
|
||||
Action move = treeSearch.getAction(gameConfig, gameState, Player.WHITE);
|
||||
|
||||
System.out.println(gameState);
|
||||
|
||||
@@ -34,13 +35,14 @@ public class AlphaBetaTest {
|
||||
@Test
|
||||
public void testGenmoveAsB() {
|
||||
Policy treeSearch = new AlphaBeta();
|
||||
GameState gameState = new GameState(6);
|
||||
GameConfig gameConfig = new GameConfig(6);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("C2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B2"));
|
||||
|
||||
Action move = treeSearch.getAction(new GameConfig(), gameState, Player.BLACK);
|
||||
Action move = treeSearch.getAction(gameConfig, gameState, Player.BLACK);
|
||||
|
||||
System.out.println(gameState);
|
||||
|
||||
|
||||
@@ -12,13 +12,14 @@ public class MinimaxTest {
|
||||
@Test
|
||||
public void testGenmoveAsW() {
|
||||
Policy treeSearch = new Minimax();
|
||||
GameState gameState = new GameState(6);
|
||||
GameConfig gameConfig = new GameConfig(6);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("C2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B2"));
|
||||
|
||||
Action move = treeSearch.getAction(new GameConfig(), gameState,
|
||||
Action move = treeSearch.getAction(gameConfig, gameState,
|
||||
Player.WHITE);
|
||||
|
||||
System.out.println(gameState);
|
||||
@@ -35,13 +36,14 @@ public class MinimaxTest {
|
||||
@Test
|
||||
public void testGenmoveAsB() {
|
||||
Policy treeSearch = new Minimax();
|
||||
GameState gameState = new GameState(6);
|
||||
GameConfig gameConfig = new GameConfig(6);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("C2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B2"));
|
||||
|
||||
Action move = treeSearch.getAction(new GameConfig(), gameState,
|
||||
Action move = treeSearch.getAction(gameConfig, gameState,
|
||||
Player.BLACK);
|
||||
|
||||
System.out.println(gameState);
|
||||
|
||||
@@ -15,13 +15,14 @@ public class MonteCarloUCTTest {
|
||||
@Test
|
||||
public void testGenmoveAsW() {
|
||||
Policy treeSearch = new MonteCarloUCT(new RandomMovePolicy(),10000L);
|
||||
GameState gameState = new GameState(6);
|
||||
GameConfig gameConfig = new GameConfig(6);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("C2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B2"));
|
||||
|
||||
Action move = treeSearch.getAction(new GameConfig(), gameState, Player.WHITE);
|
||||
Action move = treeSearch.getAction(gameConfig, gameState, Player.WHITE);
|
||||
|
||||
System.out.println(gameState);
|
||||
|
||||
@@ -37,13 +38,14 @@ public class MonteCarloUCTTest {
|
||||
@Test
|
||||
public void testGenmoveAsB() {
|
||||
Policy treeSearch = new MonteCarloUCT(new RandomMovePolicy(),10000L);
|
||||
GameState gameState = new GameState(6);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("C2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B2"));
|
||||
|
||||
Action move = treeSearch.getAction(new GameConfig(), gameState, Player.BLACK);
|
||||
Action move = treeSearch.getAction(gameConfig, gameState, Player.BLACK);
|
||||
|
||||
System.out.println(gameState);
|
||||
|
||||
@@ -59,7 +61,8 @@ public class MonteCarloUCTTest {
|
||||
@Test
|
||||
public void testIllegalMoveRejection() {
|
||||
Policy treeSearch = new MonteCarloUCT(new RandomMovePolicy(),2000L);
|
||||
GameState gameState = new GameState(4);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("C2"));
|
||||
@@ -68,7 +71,7 @@ public class MonteCarloUCTTest {
|
||||
Action move;
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
move = treeSearch.getAction(new GameConfig(), gameState, Player.BLACK);
|
||||
move = treeSearch.getAction(gameConfig, gameState, Player.BLACK);
|
||||
System.out.println("Generated move: " + move);
|
||||
GameState stateCopy = new GameState(gameState);
|
||||
stateCopy.playStone(Player.BLACK, move);
|
||||
|
||||
@@ -20,17 +20,20 @@ public class RandomTest {
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testGenmoveForNone() {
|
||||
Policy moveGenerator = new RandomMovePolicy();
|
||||
GameState gameState = new GameState(5);
|
||||
moveGenerator.getAction(new GameConfig(), gameState, Player.BLACK);
|
||||
gameState = new GameState(5);
|
||||
moveGenerator.getAction(new GameConfig(), gameState, Player.WHITE);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
moveGenerator.getAction(gameConfig, gameState, Player.BLACK);
|
||||
gameConfig = new GameConfig(5);
|
||||
gameState = new GameState(gameConfig);
|
||||
moveGenerator.getAction(gameConfig, gameState, Player.WHITE);
|
||||
|
||||
assertEquals(Action.PASS, moveGenerator.getAction(new GameConfig(), gameState, Player.NONE));
|
||||
assertEquals(Action.PASS, moveGenerator.getAction(gameConfig, gameState, Player.NONE));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlternativeToIllegalMove() {
|
||||
GameState gameState = new GameState(4);
|
||||
GameConfig gameConfig = new GameConfig(4);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A1"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.BLACK, Action.getInstance("A3"));
|
||||
@@ -52,14 +55,15 @@ public class RandomTest {
|
||||
List<Action> prohibitedMoves = new ArrayList<Action>();
|
||||
prohibitedMoves.add(Action.PASS);
|
||||
|
||||
assertEquals(Action.getInstance("B3"), new RandomMovePolicy().getAction(new GameConfig(), gameState, prohibitedMoves, Player.WHITE));
|
||||
assertEquals(Action.getInstance("B3"), new RandomMovePolicy().getAction(gameConfig, gameState, prohibitedMoves, Player.WHITE));
|
||||
|
||||
System.out.println(gameState);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveSuicide() {
|
||||
GameState gameState = new GameState(3);
|
||||
GameConfig gameConfig = new GameConfig(3);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
@@ -74,7 +78,7 @@ public class RandomTest {
|
||||
//There is only a minute chance (5E-7) that RandomMoveGenerator fails to return an invalid move with probability 1/4
|
||||
//after 50 calls, if this bug recurs.
|
||||
for (int i = 0; i < 50; i++) {
|
||||
Action action = randomMovePolicy.getAction(new GameConfig(),gameState,Player.BLACK);
|
||||
Action action = randomMovePolicy.getAction(gameConfig,gameState,Player.BLACK);
|
||||
//System.out.println(action);
|
||||
assertFalse("RandomMovePolicy returned illegal suicide move A2",action.equals(Action.getInstance("A2")));
|
||||
}
|
||||
@@ -82,7 +86,8 @@ public class RandomTest {
|
||||
|
||||
@Test
|
||||
public void testIllegalMoveKo() {
|
||||
GameState gameState = new GameState(4);
|
||||
GameConfig gameConfig = new GameConfig(4);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
@@ -101,7 +106,7 @@ public class RandomTest {
|
||||
RandomMovePolicy randomMovePolicy = new RandomMovePolicy();
|
||||
//Test that after 50 moves, the policy never returns B3, which would be a Ko violation
|
||||
for (int i = 0; i < 50; i++) {
|
||||
Action action = randomMovePolicy.getAction(new GameConfig(),gameState,Player.WHITE);
|
||||
Action action = randomMovePolicy.getAction(gameConfig,gameState,Player.WHITE);
|
||||
//System.out.println(action);
|
||||
assertFalse(action.equals(Action.NONE));
|
||||
assertFalse("RandomMovePolicy returned Ko violation move B3",action.equals(Action.getInstance("B3")));
|
||||
|
||||
@@ -26,7 +26,8 @@ public class ValidMoveGeneratorTest {
|
||||
1 . O . . . 1
|
||||
A B C D E
|
||||
*/
|
||||
GameState gameState = new GameState(5);
|
||||
GameConfig gameConfig = new GameConfig(5);
|
||||
GameState gameState = new GameState(gameConfig);
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("A2"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B1"));
|
||||
gameState.playStone(Player.WHITE, Action.getInstance("B4"));
|
||||
@@ -34,7 +35,7 @@ public class ValidMoveGeneratorTest {
|
||||
|
||||
assertFalse(gameState.playStone(Player.BLACK, Action.getInstance("A1")));
|
||||
|
||||
List<Action> validMoves = new ValidMoveGenerator().getActions(new GameConfig(), gameState, Player.BLACK,0);
|
||||
List<Action> validMoves = new ValidMoveGenerator().getActions(gameConfig, gameState, Player.BLACK,0);
|
||||
|
||||
assertTrue(validMoves.size() > 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user