-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathclient.py
More file actions
30 lines (21 loc) · 564 Bytes
/
client.py
File metadata and controls
30 lines (21 loc) · 564 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
"The Facade Example Use Case"
import time
from decimal import Decimal
from game_api import GameAPI
USER = {"user_name": "sean"}
USER_ID = GameAPI.register_user(USER)
time.sleep(1)
GameAPI.submit_entry(USER_ID, Decimal('5'))
time.sleep(1)
print()
print("---- Gamestate Snapshot ----")
print(GameAPI.game_state())
time.sleep(1)
HISTORY = GameAPI.get_history()
print()
print("---- Reports History ----")
for row in HISTORY:
print(f"{row} : {HISTORY[row][0]} : {HISTORY[row][1]}")
print()
print("---- Gamestate Snapshot ----")
print(GameAPI.game_state())