Refactoring in progress.
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.
This commit is contained in:
@@ -1,22 +1,18 @@
|
||||
package net.woodyfolsom.msproj;
|
||||
|
||||
import net.woodyfolsom.msproj.GameBoard;
|
||||
import net.woodyfolsom.msproj.GameState;
|
||||
import net.woodyfolsom.msproj.TerritoryMarker;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class TerritoryFinderTest {
|
||||
@Test
|
||||
public void testMarkTerritory() {
|
||||
GameState gameState = new GameState(5);
|
||||
|
||||
gameState.playStone('A',2,GameBoard.BLACK_STONE);
|
||||
gameState.playStone('B',3,GameBoard.BLACK_STONE);
|
||||
gameState.playStone('C',2,GameBoard.BLACK_STONE);
|
||||
gameState.playStone('B',1,GameBoard.BLACK_STONE);
|
||||
gameState.playStone('E',5,GameBoard.WHITE_STONE);
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user