public void TestRightDiagWin() { var board = new CTTBoard(); board.ApplyStep(CTTBoard.Player.PlayerO, 0, 2); board.ApplyStep(CTTBoard.Player.PlayerO, 1, 1); board.ApplyStep(CTTBoard.Player.PlayerO, 2, 0); Assert.IsTrue(board.CheckWin(), "should win"); }
public void TestLeftColumnWin5() { var board = new CTTBoard(); board.ApplyStep(CTTBoard.Player.PlayerO, 0, 2); board.ApplyStep(CTTBoard.Player.PlayerO, 1, 2); board.ApplyStep(CTTBoard.Player.PlayerO, 2, 2); Assert.IsTrue(board.CheckWin(), "should win"); }
static void Main(string[] args) { var game = new CTTHeuristic(); var board = new CTTBoard(); board.ApplyStep(CTTBoard.Player.PlayerO, 0, 0); board.ApplyStep(CTTBoard.Player.PlayerO, 2, 2); //board.ApplyStep(CTTBoard.Player.PlayerY, 1, 2); board.ApplyStep(CTTBoard.Player.PlayerX, 0, 1); board.ApplyStep(CTTBoard.Player.PlayerX, 0, 2); //board.ApplyStep(CTTBoard.Player.PlayerX, 2, 2); board.Dump2Con(); var ass = game.GetNextStepAssesment(board, CTTBoard.Player.PlayerX); }