Пример #1
0
        game.start_vote_time()
        print("vote time started, you can vote")
        time.sleep(20)
        print("turn ended")
        game.end_turn()
        game.start_new_turn()


th = threading.Thread(target=run_game)
th.start()

while True:
    print("you can perform query")
    query = input()
    if query.split()[0] == 'suggest_card':
        game.suggest_card(int(query.split()[1]), int(query.split()[2]),
                          int(query.split()[3]))
    if query.split()[0] == 'vote':
        game.players[int(query.split()[1])].vote(int(query.split()[2]), game)
    if query.split()[0] == 'get_vote_weight':
        print(game.players[int(query.split()[1])].get_vote_weight(game))
    if query.split()[0] == 'get_players_can_vote':
        print(game.players[int(query.split()[1])].get_players_can_vote(game))
    if query.split()[0] == 'get_cards_can_suggest':
        print(game.players[int(query.split()[1])].get_cards_can_suggest(game))
    if query.split()[0] == 'get_players_can_suggest_card':
        print(game.players[int(query.split()[1])].get_players_can_suggest_card(
            int(query.split()[2]), game))
'''
get_cards_can_suggest 3 
get_players_can_suggest_card 3 0
get_players_can_suggest_card 3 1