mirror of
https://github.com/JonasunderscoreJones/EPR-Gruppenabgabe-07.git
synced 2025-10-23 01:39:18 +02:00
fixed uwu
This commit is contained in:
parent
0685e7c071
commit
67cd8cfaa6
2 changed files with 10 additions and 4 deletions
2
main.py
2
main.py
|
@ -76,7 +76,7 @@ def main(first_time:bool=True, previous_config = None):
|
|||
for i in range(0, int(previous_config[1])):
|
||||
players.append(PLAYER(screen_handler.console_input(
|
||||
f'Name for Player {i + 1}: In der kürze liegt die Würze \
|
||||
(In short lies the spice :) )', '', screen=screen), []))
|
||||
(In short lies the spice :) )', '', screen=screen), []))
|
||||
for i in range(0, int(previous_config[2])):
|
||||
players.append(BOT(f'Bot {i + 1}', i + 1, []))
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ def config_sequence(screen:Matrix):
|
|||
config[question_no + 1] = input
|
||||
previous_question = i
|
||||
question_no += 1
|
||||
question_possible_asnwers[1] = f"{'0' if config[1] == '5' else '1'} -\
|
||||
question_possible_asnwers[1] = f"{'0' if config[1] == '5' else '2' if config[1] == '0' else '1'} -\
|
||||
{5 - int(config[1])}"
|
||||
return config
|
||||
|
||||
|
@ -303,8 +303,14 @@ def player_interface(screen:Matrix, player:PLAYER, round_no:int, stich:int,
|
|||
{player.get_points()}")
|
||||
draw_player_cards(screen, player.get_cards())
|
||||
screen.print()
|
||||
wrong_input = True
|
||||
while wrong_input:
|
||||
chosen_card = console_input("Choose a card by its number", "[1 - " +\
|
||||
str(len(player.get_cards())) + "]", screen, fullscreen=True)
|
||||
if chosen_card.isdigit():
|
||||
if int(chosen_card) > 0 and int(chosen_card) <=\
|
||||
len(player.get_cards()):
|
||||
wrong_input = False
|
||||
return player.pop_card(int(chosen_card) - 1)
|
||||
|
||||
def bot_interface(screen:Matrix, bot:BOT, round_no:int, stich:int):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue