def send_gamestate(self, connection_id=None):
"""Send out game state data relevant to clients."""
self.io.send('TURN ' + str(self.turn))
for c_id in self.sessions:
def send_gamestate(self, connection_id=None):
"""Send out game state data relevant to clients."""
self.io.send('TURN ' + str(self.turn))
for c_id in self.sessions:
visible_terrain = player.fov_stencil_map()
self.io.send('FOV %s' % quote(player.fov_stencil.terrain), c_id)
self.io.send('MAP %s %s %s' % (self.get_map_geometry_shape(),
visible_terrain = player.fov_stencil_map()
self.io.send('FOV %s' % quote(player.fov_stencil.terrain), c_id)
self.io.send('MAP %s %s %s' % (self.get_map_geometry_shape(),
self.io.send('GAME_ERROR ' + quote(str(e)), connection_id)
except PlayError as e:
for connection_id in [c_id for c_id in self.sessions
self.io.send('GAME_ERROR ' + quote(str(e)), connection_id)
except PlayError as e:
for connection_id in [c_id for c_id in self.sessions
return p
def cmd_TASK_colon(task_name, game, *args, connection_id):
return p
def cmd_TASK_colon(task_name, game, *args, connection_id):
t.set_next_task(task_name, args)
def task_prefixed(command_name, task_prefix, task_command):
t.set_next_task(task_name, args)
def task_prefixed(command_name, task_prefix, task_command):