Player and Action classes are now singletons (factory pattern) rather than String values. Implementing more general treesearch code for minimax, alpha-beta, monte carlo using simplified backup logic.
20 lines
609 B
Java
20 lines
609 B
Java
package net.woodyfolsom.msproj;
|
|
|
|
import org.junit.Test;
|
|
|
|
public class TerritoryFinderTest {
|
|
@Test
|
|
public void testMarkTerritory() {
|
|
GameState gameState = new GameState(5);
|
|
|
|
gameState.playStone(Player.BLACK, Action.getInstance("A2"));
|
|
gameState.playStone(Player.BLACK, Action.getInstance("B3"));
|
|
gameState.playStone(Player.BLACK, Action.getInstance("C2"));
|
|
gameState.playStone(Player.BLACK, Action.getInstance("B1"));
|
|
gameState.playStone(Player.WHITE, Action.getInstance("E5"));
|
|
|
|
TerritoryMarker.markTerritory(gameState.getGameBoard());
|
|
System.out.println(gameState);
|
|
}
|
|
}
|