def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.task = Task(self, 'wait')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.task = Task(self, 'wait')
def task_move(self, direction):
move_pos(direction, self.position)
def task_move(self, direction):
move_pos(direction, self.position)
- def cmd_GET_TURN(self, connection_id):
- """Send world.turn to caller."""
- self.send_to(connection_id, str(self.world.turn))
+ def cmd_GET_GAMESTATE(self, connection_id):
+ """Send game state jto caller."""
+ self.send_gamestate(connection_id)
def cmd_ECHO(self, msg, connection_id):
"""Send msg to caller."""
def cmd_ECHO(self, msg, connection_id):
"""Send msg to caller."""