From 07aa70614961f46cf93830f2f3d7a33f9c4ef6c1 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sat, 28 Nov 2015 12:44:13 +0100
Subject: [PATCH] New client: Read in player position and map size.

---
 client_prototype.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/client_prototype.py b/client_prototype.py
index bed6400..a625629 100644
--- a/client_prototype.py
+++ b/client_prototype.py
@@ -195,6 +195,9 @@ def read_worldstate():
             if line == '%':
                 break
             world_data["inventory"] += [line]
+        world_data["position"][0] = int(worldstate_file.readline())
+        world_data["position"][1] = int(worldstate_file.readline())
+        world_data["map_size"] = int(worldstate_file.readline())
     worldstate_file.close()
 read_worldstate.last_checked_mtime = -1
 
@@ -341,6 +344,8 @@ world_data = {
     "inventory": [],
     "lifepoints": -1,
     "log": [],
+    "map_size": -1,
+    "position": [-1, -1],
     "satiation": -1,
     "turn": -1
 }
-- 
2.30.2