import numpy as np

from heuristics.conditions.condition import Condition


class OccupiedCellsCondition(Condition):
    """Returns number of rounds."""
    def __init__(self):
        """Initialize OccupiedCellsCondition. """

    def score(self, cells, player, opponents, rounds, deadline):
        """Return number of rounds."""
        return np.sum(cells) / np.prod(cells.shape)

    def __str__(self):
        """Get readable representation."""
        return "OccupiedCellsCondition()"

import numpy as np

from heuristics.conditions.condition import Condition


class OccupiedCellsCondition(Condition):
    """Returns number of rounds."""
    def __init__(self):
        """Initialize OccupiedCellsCondition. """

    def score(self, cells, player, opponents, rounds, deadline):
        """Return number of rounds."""
        return np.sum(cells) / np.prod(cells.shape)

    def __str__(self):
        """Get readable representation."""
        return "OccupiedCellsCondition()"

Returns number of rounds. Initialize OccupiedCellsCondition. Return number of rounds. Get readable representation.