@@ -42,31 +42,36 @@ def play_game(self):
42
42
self .round .prepare_turn ()
43
43
player = self .players [self .round .current_player ]
44
44
player .turn (self .round )
45
+ View .render (player .show_turn_start ())
46
+ View .render (player .has_someone_knocked ())
47
+ View .render (player .draw_from_deck_or_discard_pile ())
48
+ View .render (player .show_turn_end ())
49
+ player .discard_or_knock ()
50
+ View .render (player .show_discard ())
45
51
self .round .end_turn ()
46
- self .end_round ()
52
+ View . render ( self .end_round () )
47
53
sleep (1.2 )
48
- self .start_new_round_or_end_game ()
49
-
50
- def start_new_round_or_end_game (self ):
51
54
if self .score .is_end_of_game ():
52
- self .score .end_game ( )
55
+ View . render ( self .score .show_winners () )
53
56
else :
54
- self .round .rotate_first_player ()
55
- if not self .ai_only :
56
- self .confirm_start_new_round ()
57
- self .round .prepare_new_round ()
58
- self .round .deal_cards (self .players )
59
- self .play_game ()
57
+ self .start_new_round ()
58
+
59
+ def start_new_round (self ):
60
+ self .round .rotate_first_player ()
61
+ if not self .ai_only :
62
+ self .confirm_start_new_round ()
63
+ self .round .prepare_new_round ()
64
+ self .round .deal_cards (self .players )
65
+ self .play_game ()
60
66
61
67
@staticmethod
62
68
def confirm_start_new_round ():
63
69
UserInput .create_input (MenuActionDialog .next_round ())
64
70
65
71
def end_round (self ):
66
72
self .score .update_player_scores ()
67
- View .render (
68
- View .template_this_round_score (self .score .get_end_of_round_scores (), self .score .get_current_game_scores ())
69
- )
73
+ return View .template_this_round_score (self .score .get_end_of_round_scores (),
74
+ self .score .get_current_game_scores ())
70
75
71
76
72
77
# start game
0 commit comments