map_tile = self.thing.world.terrain_map[pos_i]
if map_tile != '.':
raise GameError('would move into illegal terrain')
+ for t in self.thing.world.things:
+ if t.position == test_pos:
+ raise GameError('would move into other thing')
class Thing(game_common.Thing):
self.world.get_player().set_task('wait')
self.proceed()
- 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."""