1 from plomrogue.errors import GameError
2 from plomrogue.mapping import YX
10 def __init__(self, thing, args=()):
19 class Task_WAIT(Task):
27 class Task_MOVE(Task):
28 argtypes = 'string:direction'
30 def get_move_target(self):
31 return self.thing.game.map_geometry.move(self.thing.position,
35 test_pos = self.get_move_target()
36 if test_pos.y < 0 or test_pos.x < 0 or test_pos.y >= 24 or test_pos.x >= 40:
37 raise GameError('would move out of map')
40 self.thing.position = self.get_move_target()