Exemple #1
0
        public void TransposeRightTest()
        {
            for (int i = 0; i < 100; ++i)
            {
                var chessBoard = new ChessBoard();
                ChessBoardHandler.AddRightDiagonal(chessBoard);
                ChessBoardHandler.AddSymmetryToRightDiagonal(chessBoard);

                Assert.AreEqual(chessBoard, chessBoard.ToTransposeRight());
                chessBoard.RandomAdd();
                Assert.AreNotEqual(chessBoard, chessBoard.ToTransposeRight());
            }
        }
 public void TransposeRightTest()
 {
     for (int i = 0; i < 100; ++i)
     {
         var chessBoard = new ChessBoard();
         ChessBoardHandler.AddRightDiagonal(chessBoard);
         chessBoard.AddNew(new Position(0, 0), 10);
         chessBoard.AddNew(new Position(3, 3), 10);
         Assert.AreEqual(chessBoard, chessBoard.ToTransposeRight());
         chessBoard.RandomAdd();
         Assert.AreNotEqual(chessBoard, chessBoard.ToTransposeRight());
         Assert.AreEqual(Evaluator.EvalForMove(chessBoard), Evaluator.EvalForMove(chessBoard.ToTransposeRight()), 0.01);
         Assert.AreEqual(Evaluator.EvalForAdd(chessBoard), Evaluator.EvalForAdd(chessBoard.ToTransposeRight()), 0.01);
     }
 }