Пример #1
0
        public Move SelectNextMove()
        {
            ObservableCollection <Move> moves = Attack.AllAbsoluteAttackMoves(This.Game.CurrentPlayer.AllMovesNoKing());

            if (moves.Count == 0)
            {
                moves = Attack.AllAbsoluteAttackMoves(This.Game.CurrentPlayer.AllMoves());
            }
            if (moves.Count == 0)
            {
                moves = Attack.AllWinningAttackMoves(This.Game.CurrentPlayer.AllMoves());
            }
            if (moves.Count == 0)
            {
                moves = Attack.AllWinningOrEqualAttackMoves(This.Game.CurrentPlayer.AllMoves());
            }
            if (moves.Count == 0)
            {
                moves = This.Game.CurrentPlayer.AllMovesNoKing();
            }
            if (moves.Count == 0)
            {
                moves = This.Game.CurrentPlayer.AllMoves();
            }
            return(this.RateMoves(moves));
        }