X-Git-Url: https://plomlompom.com/repos/?p=plomrogue2-experiments;a=blobdiff_plain;f=client-curses.py;h=ea5dcf32f8ad34d9281de174566fe64f3a20601f;hp=9a8178d9d133ad5b366a43819aa5fbefd5a2588e;hb=23462b9ad5f46f8dd323aed66e557235802e3c98;hpb=6237227d771fa5b4cfbcdffb8c74457e2d406bb1 diff --git a/client-curses.py b/client-curses.py index 9a8178d..ea5dcf3 100755 --- a/client-curses.py +++ b/client-curses.py @@ -128,12 +128,12 @@ class Game(game_common.CommonCommandsMixin): self.do_quit = True return try: - command = self.parser.parse(msg) + command, args = self.parser.parse(msg) if command is None: self.log('UNHANDLED INPUT: ' + msg) self.to_update['log'] = True else: - command() + command(*args) except ArgError as e: self.log('ARGUMENT ERROR: ' + msg + '\n' + str(e)) self.to_update['log'] = True @@ -161,13 +161,13 @@ class Game(game_common.CommonCommandsMixin): pass cmd_TURN_FINISHED.argtypes = 'int:nonneg' - def cmd_NEW_TURN(self, n): + def cmd_TURN(self, n): """Set self.turn to n, empty self.things.""" self.world.turn = n self.world.things = [] self.to_update['turn'] = False self.to_update['map'] = False - cmd_NEW_TURN.argtypes = 'int:nonneg' + cmd_TURN.argtypes = 'int:nonneg' def cmd_VISIBLE_MAP_LINE(self, y, terrain_line): self.world.map_.set_line(y, terrain_line)