Esempio n. 1
0
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()
Esempio n. 2
0
 def __init__(self, *args, **kws):
     self.world = Dya()
     self.players = []
     super(TaleEngine, self).__init__(*args, **kws)