package net.woodyfolsom.msproj;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class GameBoardTest {
	@Test
	public void testCapture() {
		GameConfig gameConfig = new GameConfig(5);
		GameState gameState = new GameState(gameConfig);

		assertTrue(gameState.placeStone(Player.BLACK, Action.getInstance("A2")));
		assertTrue(gameState.placeStone(Player.BLACK, Action.getInstance("B3")));
		assertTrue(gameState.placeStone(Player.BLACK, Action.getInstance("B1")));
		assertTrue(gameState.placeStone(Player.BLACK, Action.getInstance("C2")));

		assertTrue(gameState.isSelfFill(Action.getInstance("B2"), Player.BLACK));
		assertFalse(gameState
				.isSelfFill(Action.getInstance("B2"), Player.WHITE));
		assertFalse(gameState
				.isSelfFill(Action.getInstance("B4"), Player.BLACK));
		assertFalse(gameState
				.isSelfFill(Action.getInstance("B4"), Player.BLACK));

		System.out.println(gameState);
	}
}