class TaleEngine(object): def __init__(self, *args, **kws): self.world = Dya() self.players = [] super(TaleEngine, self).__init__(*args, **kws) def player(self): player = Player(self.world.euia.center) self.players.append(proxy(player, self.logouter(player))) return player def logouter(self, player): def logout(): self.players.remove(player) return logout def tick(self): self.world.tick() for player in self.players: player.tick()
def __init__(self, *args, **kws): self.world = Dya() self.players = [] super(TaleEngine, self).__init__(*args, **kws)