コード例 #1
0
        public override IEnumerable <Square> GetAvailableMoves(Board board)
        {
            var currentSquare  = board.FindPiece(this);
            var availableMoves = (List <Square>)LinearMovers.GetLateralMoves(board, this);

            availableMoves.AddRange(LinearMovers.GetDiagonalMoves(board, this));
            return(availableMoves);
        }
コード例 #2
0
ファイル: Bishop.cs プロジェクト: AndrewYHuang/Chessington
 public override IEnumerable <Square> GetAvailableMoves(Board board)
 {
     return(LinearMovers.GetDiagonalMoves(board, this));
 }