Skip to content

Commit fbe57ba

Browse files
committed
fix: resume game menu try to compare string input with integer when determine whether the option is valid
1 parent 371b405 commit fbe57ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mastermind/ui/menu/resume_game_menu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ def get_option(self) -> Union[str, int]:
6363
self.display()
6464

6565

66-
def _is_option_valid(option: int, number_of_options: int) -> bool:
67-
return option.isdigit() and 0 <= option <= number_of_options
66+
def _is_option_valid(option: str, number_of_options: int) -> bool:
67+
return option.isdigit() and 0 <= int(option) <= number_of_options

0 commit comments

Comments
 (0)