def main(): game = userfunctions.start_game() while userfunctions.check_winner(game) is False: move = userfunctions.get_move() if move == 0: game = console_pop(game) elif move == 1: game = console_drop(game)
def main(): client = online.input_host() if client == None: print('FATAL ERROR: Failed to connect') return try: online.ics_connect(client) except ValueError: print('FATAL ERROR: Connection closed') return game = userfunctions.start_game() while userfunctions.check_winner(game) is False: try: game = user_move(game, client) if userfunctions.check_winner(game) is True: break game = server_move(game, client) except ValueError: print('FATAL ERROR: Connection closed') break online.close_client(client)