Ejemplo n.º 1
0
        public static void TestIsStalemated()
        {
            CrazyhouseChessGame game = new CrazyhouseChessGame("rnbqkbnr/pppppppp/8/5K2/8/8/ppp1qppp/rnb2bnr/pp w kq - 98 71");

            Assert.True(game.IsStalemated(Player.White));
            Assert.False(game.IsCheckmated(Player.White));
        }
Ejemplo n.º 2
0
        public static void TestIsCheckmated()
        {
            CrazyhouseChessGame game = new CrazyhouseChessGame("r2q1r2/ppp4p/2np1Pp1/8/4P1Pk/6bP/PB3bPq/R6K/Pprnnnbpp w - - 76 39");

            Assert.True(game.IsCheckmated(Player.White));
            Assert.False(game.IsStalemated(Player.White));
        }
Ejemplo n.º 3
0
        public static void TestNotStalemated_CanDrop()
        {
            CrazyhouseChessGame game = new CrazyhouseChessGame("rnbqkbnr/pppppppp/8/7K/5q2/8/ppp2ppp/rnb2bnr/Pp w kq - 0 1");

            Assert.False(game.IsStalemated(Player.White));

            Assert.AreEqual(32, game.GetValidDrops(Player.White).Count);
        }