X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D?a=blobdiff_plain;f=new2%2Fplomrogue%2Fgame.py;h=e8c85da35adef872a0667bf97a75c09189049995;hb=428ba19a1984f385f5fc55201734a150f59dafcb;hp=47e08fb93c6257b0148cbc4768b837c4d85a37cb;hpb=e1d03eb7d5f847813071e1711accbb4d9153fdcf;p=plomrogue2-experiments diff --git a/new2/plomrogue/game.py b/new2/plomrogue/game.py index 47e08fb..e8c85da 100755 --- a/new2/plomrogue/game.py +++ b/new2/plomrogue/game.py @@ -4,7 +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 +from plomrogue.mapping import YX, MapGeometrySquare, Map @@ -37,13 +37,14 @@ class Game(GameBase): self.io = GameIO(self) self.tasks = {'WAIT': Task_WAIT, 'MOVE': Task_MOVE} - self.map_geometry = MapGeometrySquare() + self.map_geometry = MapGeometrySquare(YX(24, 40)) self.commands = {'QUERY': cmd_QUERY, 'ALL': cmd_ALL, 'LOGIN': cmd_LOGIN} self.thing_type = Thing self.thing_types = {'player': ThingPlayer} self.sessions = {} + self.map = Map(self.map_geometry.size) def get_string_options(self, string_option_type): if string_option_type == 'direction': @@ -59,6 +60,7 @@ class Game(GameBase): self.io.send('TURN ' + str(self.turn)) for t in self.things: send_thing(t) + self.io.send('MAP %s %s' % (self.map_geometry.size, quote(self.map.terrain))) self.io.send('GAME_STATE_COMPLETE') def run_tick(self):