class Floor(Tile): def __init__(self, pos, pid): Tile.__init__(self, pos) self.view = FloorView(pos, pid) self.active_dict = {1:False, 2:False} def set_active(self, active, player_id): self.active_dict[player_id] = active mul = map(operator.mul, self.active_dict, self.active_dict.values()) self.view.set_color(sum(mul))
def __init__(self, pos, pid): Tile.__init__(self, pos) self.view = FloorView(pos, pid) self.active_dict = {1:False, 2:False}