Update documentation

This commit is contained in:
Joel 2021-02-10 17:55:24 +01:00
parent 0f4f2438cb
commit c2b67e70c5
No known key found for this signature in database
GPG key ID: BDDDBECD0808290E
4 changed files with 59 additions and 49 deletions

View file

@ -32,26 +32,31 @@ Calling Seeding API
from compLib.Api import Seeding
park = Seeding.get_park()
print(f"I should move to parking position: {park}")
if park == 0:
print(f"I can't move to this position yet :(")
elif park == 1:
print(f"Moving to position 1!")
# drive to parking position using Motors module...
print(f"Now hopefully at position 1")
# drive back using Motors module...
elif park == 2:
# do something similar to park == 1..
elif park == 3:
# do something similar to park == 1..
success = Seeding.pay_park()
if success:
print(f"We scored some points!")
park, code = Seeding.get_park()
if code == 403:
print(f"I am not in the correct zone to make that request!")
else:
print(f"We failed :(")
park = park["id"]
print(f"I should move to parking position: {park}")
if park == 0:
print(f"I can't move to this position yet :(")
elif park == 1:
print(f"Moving to position 1!")
# drive to parking position using Motors module...
print(f"Now hopefully at position 1")
# drive back using Motors module...
elif park == 2:
# do something similar to park == 1..
elif park == 3:
# do something similar to park == 1..
success = Seeding.pay_park()
# check which code the api returned
if success == 201:
print(f"We scored some points!")
else:
print(f"We failed :(")
Calling Double Elimination API
----------------------------------