Fix move quoting
This commit is contained in:
31
rpi/main.py
31
rpi/main.py
@@ -10,7 +10,30 @@ if __name__ == "__main__":
|
||||
|
||||
controller = ApiController(config)
|
||||
|
||||
game_id = controller.create_party("Aude Vaiselle", "Jean Porte", 30, 0)
|
||||
print(game_id)
|
||||
data = controller.retrieve_game(game_id)
|
||||
print(data)
|
||||
controller.add_move("693f288327f9ffb33360fa45", "e4")
|
||||
|
||||
white_name = input("White Name: ")
|
||||
black_name = input("Black Name: ")
|
||||
time_value = int(input("Time value: "))
|
||||
increment = int(input("Increment: "))
|
||||
print("Creating the party...")
|
||||
|
||||
game_id = controller.create_party(white_name, black_name, time_value, increment)
|
||||
if game_id is None :
|
||||
print("An error occurred while creating the party. Exiting...")
|
||||
exit()
|
||||
|
||||
print("Party Created!")
|
||||
|
||||
currentPlayer = 0
|
||||
while True:
|
||||
message = None
|
||||
if currentPlayer == 0 :
|
||||
message = "White to play"
|
||||
currentPlayer = 1
|
||||
else :
|
||||
message = "Black to play"
|
||||
currentPlayer = 0
|
||||
|
||||
move = input(f"{message} : ")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user