Пример #1
0
        public bool IsPathClear(IChessPiece piece, int x, int y)
        {
            List <ChessTile> path = piece.getPath(x, y);

            foreach (ChessTile pathTile in path)
            {
                if (!IsEmpty(pathTile.X, pathTile.Y))
                {
                    return(false);
                }
            }

            return(true);
        }