Beispiel #1
0
        // Returns a list of all possible moves
        public List <Move> GetPossibleMovesList(Player i_Player, Board i_Board, ref bool capturePossible)
        {
            List <Move> movesList = new List <Move>();

            if (MoveValidator.IsPieceHaveMoves(i_Board, this))
            {
                addNonKingsMovesToList(i_Player, i_Board, movesList, ref capturePossible);
                if (this.IsKing)
                {
                    addKingsMovesToList(i_Player, i_Board, movesList, ref capturePossible);
                }
            }

            return(movesList);
        }
Beispiel #2
0
 // Public Methods
 public bool HasPossibleMoves(Player i_Player, Board i_CurrentBoard)
 {
     return(MoveValidator.IsPieceHaveMoves(i_CurrentBoard, this));
 }