Пример #1
0
        public void Whether_King_CantMoveOutsideTheBoard_On_CanMoveTo()
        {
            var board = new Board();
            var king = new King(new Square(1, 1), board, PieceColor.White);

            Assert.That(king.PossibleMoves().Count() == 3);
            Assert.That(king.CanMoveTo(new Square(-1, -1)), Is.False);
        }
Пример #2
0
        public void Whether_king_ReturnsCorrectMoves_On_PossibleMoves()
        {
            var board = new Board();
            var king = new King(new Square(4, 4), board, PieceColor.White);

            var possibleMoves = king.PossibleMoves();

            Assert.That(possibleMoves != null);
            Assert.That(possibleMoves.Count() == 8);
        }