X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=client_prototype.py;h=5bcfee5f641937450155aa63f198d7fc45963112;hb=90dbaff8a39af44f8e1ed4f0268009bf36775e95;hp=6328c8b64990f5cb65157168139e136974109dcd;hpb=5edd97c0cc10eb7421634be903851142fbdcbb91;p=plomrogue diff --git a/client_prototype.py b/client_prototype.py index 6328c8b..5bcfee5 100644 --- a/client_prototype.py +++ b/client_prototype.py @@ -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")),