def cmd_THING(game, yx, thing_type, thing_id):
if not thing_type in game.thing_types:
raise GameError('illegal thing type %s' % thing_type)
- if yx.y < 0 or yx.x < 0 or yx.y >= game.map.size.y or yx.x >= game.map.size.x:
+ if not game.map.inside(yx):
raise GameError('illegal position %s' % yx)
t_old = None
if thing_id > 0: