idk
This commit is contained in:
@@ -99,7 +99,7 @@ class Game:
|
||||
def play_round(self) -> None:
|
||||
self.renderer.render_message("Round {} start!".format(self.round_count))
|
||||
self.deal_cards()
|
||||
self.determine_game_type()
|
||||
self.decide_on_game()
|
||||
self.update_trump_ranking()
|
||||
for i in range(len(self.deck) // Game.PLAYER_COUNT):
|
||||
self.trick_count += 1
|
||||
@@ -112,7 +112,7 @@ class Game:
|
||||
self.renderer.render_message("{}: {} points.".format(player.get_name(), score))
|
||||
self.renderer.render_message("Round end!")
|
||||
|
||||
def determine_game_type(self) -> None:
|
||||
def decide_on_game(self) -> None:
|
||||
player_choosing = self.current_player_index
|
||||
player = None
|
||||
for i in range(len(self.players)):
|
||||
|
||||
@@ -47,7 +47,8 @@ class HumanDecisionInterface(DecisionMaker):
|
||||
try:
|
||||
print("Choose a game to play: ")
|
||||
print(", ".join(
|
||||
["Pass (1)"] + ["{} ({})".format(round_type.name, i + 1) for i, round_type in enumerate(round_types)
|
||||
["Pass (1)"] + ["{} ({})".format(round_type.name, i + 1)
|
||||
for i, round_type in enumerate(round_types)
|
||||
if round_type is not None]))
|
||||
attempt = int(input(" -> "))
|
||||
type_choice = round_types[attempt - 1]
|
||||
@@ -62,7 +63,10 @@ class HumanDecisionInterface(DecisionMaker):
|
||||
suit_choice = None
|
||||
while suit_choice is None:
|
||||
try:
|
||||
suit_types = [suit for suit in Card.Suit] if type_choice != RoundType.Sauspiel else sauspiel_choices
|
||||
if type_choice == RoundType.Sauspiel:
|
||||
suit_types = sauspiel_choices
|
||||
else:
|
||||
suit_types = [suit for suit in Card.Suit]
|
||||
print("Choose a suit to play with: ")
|
||||
print(", ".join(["{} ({})".format(suit.name, i + 1) for i, suit in enumerate(suit_types)]))
|
||||
attempt = int(input(" -> "))
|
||||
|
||||
Reference in New Issue
Block a user