Add README with sample output

This commit is contained in:
Midgard 2021-03-11 15:20:52 +01:00
parent 4cc571f9d5
commit 9f20ebd44b
Signed by: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 14 additions and 2 deletions

12
README.txt Normal file
View file

@ -0,0 +1,12 @@
$ ./mozaic_receptionist.py https://mozaic.example.org/lobbies/1234 topsecretbottoken mybotname
Note: auto-accepting and auto-starting in the background.
To create new game, press enter.
NEW GAME
Map> hex
P1> mybotname
P2> noobcrusher2000
To create new game, press enter.
[Accepted proposal from mybotname]
[Started match]

View file

@ -188,7 +188,7 @@ def main():
proposal_id = proposal["id"]
owner_name = lobby.players[proposal["owner_id"]]["name"]
lobby.accept_proposal(proposal_id)
print(f"[Note: accepted proposal from {owner_name}]")
print(f"[Accepted proposal from {owner_name}]")
def start_match_if_possible(proposal):
if lobby.own_player_id == proposal["owner_id"] and proposal["status"] == "pending" and all(
@ -199,7 +199,7 @@ def main():
) for p in proposal["players"]
):
lobby.start_proposal(proposal["id"])
print(f"[Note: started match]")
print(f"[Started match]")
def on_message(ws, msg):
if msg["type"] == "proposalData":