Beispiel #1
0
        private void Internal_AnalysisMode_CanChange(UCIEngine stockfish)
        {
            // back rank mate
            string fen = "k3r3/pp6/8/3NQ3/8/8/3q1PPP/6K1 w - - 0 1";
            string move = "e5e8";

            IScore score = stockfish.GetScore (fen, move);
            Assert.AreEqual (1.0, score.Value);
        }
Beispiel #2
0
        public void Internal_GivenPositionAndAMove_ReturnScore(UCIEngine stockfish)
        {
            // back rank mate
            string fen = "k3r3/pp6/8/3NQ3/8/8/3q1PPP/6K1 w - - 0 1";
            string move = "e5e8";

            IScore score = stockfish.GetScore (fen, move);
            Assert.AreEqual (1.0, score.Value);

            // smothered mate
            fen = "k2r4/pp6/8/3NQ3/8/8/3q1PPP/6K1 w - - 0 1";
            move = "d5c7";

            score = stockfish.GetScore (fen, move);
            Assert.AreEqual (4.0, score.Value);

            // start position
            fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
            move = "e2e4";

            score = stockfish.GetScore (fen, move);
            Assert.Greater (score.Value, 1);
        }