home · contact · privacy
Improve invisibility depiction.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 12 Jan 2019 21:40:32 +0000 (22:40 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 12 Jan 2019 21:40:32 +0000 (22:40 +0100)
server.py
server_/game.py

index c5fbff4a18ef45fd22fc526d15999be4af79c809..fc095b7323d1b8989f1744e96ded68a447b62f11 100755 (executable)
--- a/server.py
+++ b/server.py
@@ -162,7 +162,7 @@ class CommandHandler(game_common.Commander, server_.game.Commander):
         self.send('MAP_SIZE ' + stringify_yx(self.world.map_.size))
         visible_map = self.world.get_player().get_visible_map()
         for y in range(self.world.map_.size[0]):
-            self.send('VISIBLE_MAP_LINE %5s %s' % (y, visible_map.get_line(y)))
+            self.send('VISIBLE_MAP_LINE %5s "%s"' % (y, visible_map.get_line(y)))
         for thing in self.world.things:
             self.send('THING_TYPE %s %s' % (thing.id_, thing.type_))
             self.send('THING_POS %s %s' % (thing.id_,
index 7e1524716585c44ad9c88fd9712566aeadfe4ac5..f6a5e9e2437ccd92ffe15e131986da91f8c061d0 100644 (file)
@@ -146,7 +146,7 @@ class Thing(game_common.Thing):
 
     def get_visible_map(self):
         size = self.world.map_.size
-        m = Map(size, '?'*size[0]*size[1])
+        m = Map(size, ' '*size[0]*size[1])
         y_me = self.position[0]
         x_me = self.position[1]
         for y in range(m.size[0]):