def proceed_to_next_player_turn(self):
"""Run game world turns until player can decide their next step.
def proceed_to_next_player_turn(self):
"""Run game world turns until player can decide their next step.
self.io = server_.io.GameIO(game_file_name, self)
# self.pool and self.pool_result are currently only needed by the FIB
# command and the demo of a parallelized game loop in cmd_inc_p.
self.io = server_.io.GameIO(game_file_name, self)
# self.pool and self.pool_result are currently only needed by the FIB
# command and the demo of a parallelized game loop in cmd_inc_p.
return 'Y:' + str(tuple_[0]) + ',X:' + str(tuple_[1])
self.io.send('NEW_TURN ' + str(self.world.turn))
return 'Y:' + str(tuple_[0]) + ',X:' + str(tuple_[1])
self.io.send('NEW_TURN ' + str(self.world.turn))
- grid = self.world.map_.__class__.__name__[3:]
- self.io.send('MAP ' + grid +' ' + stringify_yx(self.world.map_.size))
+ self.io.send('MAP ' + self.world.map_.geometry +\
+ ' ' + stringify_yx(self.world.map_.size))
visible_map = self.world.get_player().get_visible_map()
for y, line in visible_map.lines():
self.io.send('VISIBLE_MAP_LINE %5s %s' % (y, self.io.quote(line)))
visible_map = self.world.get_player().get_visible_map()
for y, line in visible_map.lines():
self.io.send('VISIBLE_MAP_LINE %5s %s' % (y, self.io.quote(line)))