public void AiScoreCalc_TestSimpleBoardForCaptureScores_CaptureScoreIsAsExpected(char currentPlayer, int xPos, int yPos, int expectedScore) { var testPos = new Pos(xPos, yPos); var gameBoard = new Board(8, 8); gameBoard.InitBoard(); var actualScore = AiWithScoreTable.AiScoreCalc(gameBoard, testPos, currentPlayer); Assert.AreEqual(expectedScore, actualScore); }
public void AiScoreCalc_TestBoardForAllSidesCaptureScores_CaptureScoreIsAsExpected(char currentPlayer, int xPos, int yPos, int expectedScore) { var testPos = new Pos(xPos, yPos); var boardData = new[] { // A B C D E F G H // 0 1 2 3 4 5 6 7 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 0 ' ', ' ', B, B, B, B, B, ' ', // 1 ' ', ' ', B, W, W, W, B, ' ', // 2 ' ', ' ', B, W, ' ', W, B, ' ', // 3 ' ', ' ', B, W, W, W, B, ' ', // 4 ' ', ' ', B, B, B, B, B, ' ', // 5 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7 }; var gameBoard = CreateBoard(boardData); var actualScore = AiWithScoreTable.AiScoreCalc(gameBoard, testPos, currentPlayer); Assert.AreEqual(expectedScore, actualScore); }