def wait_for_game(game_id): global API while not API.canStart(game_id): API.clear() print("Loading...") print(""" +--------------------------------------------+ | | Il y a acctuellement %i/4 personne(s) dans la partie #%s | +--------------------------------------------+ """ % (API.playerInGame(game_id), game_id)) time.sleep(3) API.addPipe(game_id, "print('%s est pret')" % API.user()["username"], 0) main_game(game_id)