Esempio n. 1
0
turns.start_turn(mainguy, main_screen)

main_screen.update_turn_overview(
    mainguy.get_hand_value(), mainguy.actions_left, mainguy.purchases_left, mainguy.bonus_coins,
    mainguy.current_hand_balance + mainguy.bonus_coins - mainguy.amount_spent
)

# Wait for some input
c = ""
while c != "q":
    main_screen.move_cursor_to_userinput()

    # Update screen regions
    main_screen.update_top_dynamic_values(mainguy.get_deck_score())
    main_screen.update_hand_card(mainguy.get_hand_cards())

    # Display cards in hand
    card_set = {}
    for card in mainguy.current_hand:
        card_set[card] = card_set.get(card, 0) + 1

    content = []
    content.append(("=#= Cards currently in your hand: =#=".center(r_main_content.width, " "), 1))
    content = content + format_cards([card for card in card_set.keys()], r_main_content.width
        , show_description=True, show_type=True
        )
    main_screen.show_main_content(content)

    # Get userinput
    c = main_screen.retrieve_user_input().lower()