Esempio n. 1
0
        public void TransposeLeftTest()
        {
            for (int i = 0; i < 100; ++i)
            {
                var chessBoard = new ChessBoard();
                ChessBoardHandler.AddLeftDiagonal(chessBoard);
                ChessBoardHandler.AddSymmetryToLeftDiagonal(chessBoard);

                Assert.AreEqual(chessBoard, chessBoard.ToTransposeLeft());
                chessBoard.RandomAdd();
                Assert.AreNotEqual(chessBoard, chessBoard.ToTransposeLeft());
            }
        }
Esempio n. 2
0
 public void TransposeLeftTest()
 {
     for (int i = 0; i < 100; ++i)
     {
         var chessBoard = new ChessBoard();
         ChessBoardHandler.AddLeftDiagonal(chessBoard);
         chessBoard.AddNew(new Position(0, 3), 10);
         chessBoard.AddNew(new Position(3, 0), 10);
         Assert.AreEqual(chessBoard, chessBoard.ToTransposeLeft());
         chessBoard.RandomAdd();
         Assert.AreNotEqual(chessBoard, chessBoard.ToTransposeLeft());
         Assert.AreEqual(Evaluator.EvalForMove(chessBoard), Evaluator.EvalForMove(chessBoard.ToTransposeLeft()), 0.01);
         Assert.AreEqual(Evaluator.EvalForAdd(chessBoard), Evaluator.EvalForAdd(chessBoard.ToTransposeLeft()), 0.01);
     }
 }