X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=new2%2Fplomrogue%2Fgame.py;h=47e08fb93c6257b0148cbc4768b837c4d85a37cb;hb=e1d03eb7d5f847813071e1711accbb4d9153fdcf;hp=c8c2f3cbf9fae868e15eaa0bfdba13a7233dbe8a;hpb=8f4f45798471d5b0069d7ac2caaf7d6a389ce981;p=plomrogue2-experiments diff --git a/new2/plomrogue/game.py b/new2/plomrogue/game.py index c8c2f3c..47e08fb 100755 --- a/new2/plomrogue/game.py +++ b/new2/plomrogue/game.py @@ -4,6 +4,7 @@ from plomrogue.commands import cmd_ALL, cmd_LOGIN, cmd_QUERY from plomrogue.io import GameIO from plomrogue.misc import quote from plomrogue.things import Thing, ThingPlayer +from plomrogue.mapping import MapGeometrySquare @@ -36,14 +37,17 @@ class Game(GameBase): self.io = GameIO(self) self.tasks = {'WAIT': Task_WAIT, 'MOVE': Task_MOVE} - self.commands = {'QUERY': cmd_QUERY, 'ALL': cmd_ALL, 'LOGIN': cmd_LOGIN} + self.map_geometry = MapGeometrySquare() + self.commands = {'QUERY': cmd_QUERY, + 'ALL': cmd_ALL, + 'LOGIN': cmd_LOGIN} self.thing_type = Thing self.thing_types = {'player': ThingPlayer} self.sessions = {} def get_string_options(self, string_option_type): if string_option_type == 'direction': - return ['UP', 'DOWN', 'LEFT', 'RIGHT'] + return self.map_geometry.get_directions() return None def send_gamestate(self, connection_id=None):