def mv_yx_in_dir_legal(dir, y, x):
"""Wrapper around libpr.mv_yx_in_dir_legal to simplify its use."""
def mv_yx_in_dir_legal(dir, y, x):
"""Wrapper around libpr.mv_yx_in_dir_legal to simplify its use."""
test = libpr.mv_yx_in_dir_legal_wrap(dir_c, y, x)
if -1 == test:
raise RuntimeError("Too much wrapping in mv_yx_in_dir_legal_wrap()!")
test = libpr.mv_yx_in_dir_legal_wrap(dir_c, y, x)
if -1 == test:
raise RuntimeError("Too much wrapping in mv_yx_in_dir_legal_wrap()!")
- move_result = mv_yx_in_dir_legal(t["T_ARGUMENT"], t["T_POSY"], t["T_POSX"])
+ move_result = mv_yx_in_dir_legal(chr(t["T_ARGUMENT"]),
+ t["T_POSY"], t["T_POSX"])
if 1 == move_result[0]:
pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2]
passable = "." == chr(world_db["MAP"][pos])
if 1 == move_result[0]:
pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2]
passable = "." == chr(world_db["MAP"][pos])