roll_dice is a small Python function for rolling a chosen number of dice. It accepts the number of dice as a parameter and returns the results as a list, such as [6, 1, 4]. In the Bogart game, it separates dice rolling from the larger task of managing a player's turn. section 10.4.2 section 10.4.3
Rolling three dice
Calling roll_dice(3) might print three values and return [6, 1, 4]. The returned list can then be passed to turn_over, which checks whether a 1 was rolled or whether five dice have been reached. section 10.4.2
Figure 10.6 Top-down design for the Bogart game
Use the top-down design figure to see roll_dice as a focused subtask within the Bogart game's turn-management structure. section 10.4.2
