-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrpgclient.py
More file actions
37 lines (25 loc) · 738 Bytes
/
Copy pathrpgclient.py
File metadata and controls
37 lines (25 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/python3
"""Working on client side logic for API RPG game
Just making sure github desktop works!"""
import requests
import argparse
while True:
currentstatus = requests.get(args.svrip + "/status/")
print(currentstatus)
move = ''
while move == '':
move = input('> ')
# >
# >
# > go NORTH
move = move.lower().split()
# ['go', 'north']
if move[0] == 'go':
currentstatus = requests.get(args.svrip + "/go/" + move[1])
elif move[0] == 'get':
currentstatus = requests.get(args.svrip + "/get/" + move[1])
elif move[0] == 'help':
elif move[0] == 'status':
else:
print("That is not a command I understand.")
if __name__ == "__main__":