File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 7272def parse_input (input_string : str ) -> int :
7373 """Validate input string and return as an integer.
7474
75- Check if `input_string` is an integer number between MIN_DICE and MAX_DICE.
76- If so, return the integer value. Otherwise, raise a ValueError.
75+ Check if `input_string` is an integer number between MIN_DICE
76+ and MAX_DICE. If so, return the integer value. Otherwise, raise
77+ a ValueError.
7778 """
7879 try :
7980 val = int (input_string .strip ())
@@ -86,7 +87,8 @@ def parse_input(input_string: str) -> int:
8687
8788
8889def roll_dice (num_dice : int ) -> List [int ]:
89- """Return a list of random integers between 1 and 6 with length `num_dice`.
90+ """Return a list of random integers between 1 and 6 with length
91+ `num_dice`.
9092
9193 Args:
9294 num_dice: The number of dice to roll.
@@ -144,10 +146,12 @@ def _generate_dice_faces_rows(
144146 """Combine dice face tuples into horizontal rows of strings.
145147
146148 Args:
147- dice_faces: A list of tuples, where each tuple is the ASCII art for a die.
149+ dice_faces: A list of tuples, where each tuple is the ASCII
150+ art for a die.
148151
149152 Returns:
150- A list of strings, each representing a horizontal row of the dice diagram.
153+ A list of strings, each representing a horizontal row of the
154+ dice diagram.
151155 """
152156 dice_faces_rows = []
153157 for row_idx in range (DIE_HEIGHT ):
You can’t perform that action at this time.
0 commit comments