self.io.send('TURN ' + str(self.world.turn))
self.io.send('MAP ' + stringify_yx(self.world.map_.size))
self.io.send('TURN ' + str(self.world.turn))
self.io.send('MAP ' + stringify_yx(self.world.map_.size))
for y, line in visible_map.lines():
self.io.send('VISIBLE_MAP_LINE %5s %s' % (y, quote(line)))
for y, line in visible_map.lines():
self.io.send('VISIBLE_MAP_LINE %5s %s' % (y, quote(line)))
for thing in visible_things:
self.io.send('THING_TYPE %s %s' % (thing.id_, thing.type_))
self.io.send('THING_POS %s %s' % (thing.id_,
stringify_yx(thing.position)))
for thing in visible_things:
self.io.send('THING_TYPE %s %s' % (thing.id_, thing.type_))
self.io.send('THING_POS %s %s' % (thing.id_,
stringify_yx(thing.position)))
- player = self.world.get_player()
- self.io.send('PLAYER_POS %s' % (stringify_yx(player.position)))
- if len(player.inventory) > 0:
- self.io.send('PLAYER_INVENTORY %s' % ','.join([str(i) for i in
- player.inventory]))
+ if len(self.world.player.inventory) > 0:
+ self.io.send('PLAYER_INVENTORY %s' %
+ ','.join([str(i) for i in self.world.player.inventory]))
thing = self.world.get_thing(id_)
self.io.send('THING_TYPE %s %s' % (thing.id_, thing.type_))
self.io.send('THING_POS %s %s' % (thing.id_,
thing = self.world.get_thing(id_)
self.io.send('THING_TYPE %s %s' % (thing.id_, thing.type_))
self.io.send('THING_POS %s %s' % (thing.id_,
game.proceed()
def cmd_SET_TASK_colon(task_name, game, thing_id, todo, *args):
game.proceed()
def cmd_SET_TASK_colon(task_name, game, thing_id, todo, *args):