home · contact · privacy
New client: Remove duplicate code.
[plomrogue] / client_prototype.py
index 6328c8b64990f5cb65157168139e136974109dcd..5bcfee5f641937450155aa63f198d7fc45963112 100644 (file)
@@ -384,20 +384,6 @@ def win_look():
     return offset, winmap_size, winmap
 
 
-def win_look():
-    winmap = ""
-    winmap_size = [0, 0]
-    for line in world_data["look"]:
-        winmap_size[1] = winmap_size[1] if len(line) <= winmap_size[1] \
-            else len(line)
-    for line in world_data["look"]:
-        padding_size = winmap_size[1] - len(line)
-        winmap += line + (" " * padding_size)
-        winmap_size[0] = winmap_size[0] + 1
-    offset = [0, 0]
-    return offset, winmap_size, winmap
-
-
 def win_info():
     winmap = "T: " + str(world_data["turn"]) \
         + " H: " + str(world_data["lifepoints"]) \
@@ -492,7 +478,9 @@ io = {
     "path_worldstate": "server/worldstate"
 }
 commands = {
+    "P": (command_sender("pick_up"),),
     "Q": (command_quit,),
+    "W": (command_sender("wait"),),
     "c": (command_sender("move south-east"), command_looker("south-east")),
     "d": (command_sender("move east"), command_looker("east")),
     "e": (command_sender("move north-east"), command_looker("north-east")),