X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomrogue%2Fio.py;h=490706eefd9fe2ef203632dd6b255180839fd252;hb=f3e107445e4de3f4e79c3d369dd70f5bab8b7d0d;hp=438b8b6e1301e4da584127382629791ce87756b6;hpb=9690851ac5b6c0c994a59a3de405e147e883345b;p=plomrogue2 diff --git a/plomrogue/io.py b/plomrogue/io.py index 438b8b6..490706e 100644 --- a/plomrogue/io.py +++ b/plomrogue/io.py @@ -13,6 +13,18 @@ class GameIO(): self.save_file = save_file self.servers = [] + def train_parser(self): + import string + self.parser.string_options = { + 'map_geometry': {'Hex', 'Square'}, + 'char': [c for c in + string.digits + string.ascii_letters + string.punctuation + + ' '], + 'direction': self.game.map_geometry.directions, + 'direction+here': ['HERE'] + self.game.map_geometry.directions, + 'thing_type': self.game.thing_types.keys() + } + def loop(self, q): """Handle commands coming through queue q, run game, send results back.