mastermind.ui.menu package¶
- class mastermind.ui.menu.base_menu.BaseMenu[source]¶
Bases:
ABC
The abstract base class for all menu-based user interfaces.
Provides common functionality for displaying menus, including printing headers, content, and separators.
- menu = {}¶
- abstract property name: str¶
Returns the name of the menu.
This is an abstract property that must be implemented by subclasses.
- property width: int¶
Returns the width of the menu, based on the maximum length of the menu items.
- class mastermind.ui.menu.data_menu.DataDisplayMenu[source]¶
Bases:
BaseMenu
An abstract base class for menus that display data.
Provides common functionality for fetching, rendering, and displaying data.
- class mastermind.ui.menu.game_history_menu.GameHistoryMenu[source]¶
Bases:
DataDisplayMenu
The menu for displaying the game history.
- name = 'Game History'¶
- width = 25¶
- class mastermind.ui.menu.main_menu.MainMenu[source]¶
Bases:
OptionMenu
The main menu of the application.
- menu = {'0': 'Save and Exit', '1': 'Start New Game', '2': 'Load Saved Game', '3': 'Game History'}¶
- name = 'Main Menu'¶
- class mastermind.ui.menu.new_game_menu.NewGameMenu[source]¶
Bases:
OptionMenu
The menu for starting a new game.
- menu = {'0': 'Return to Main Menu', '1': 'You vs Someone Else', '2': 'You vs AI', '3': 'AI vs You', '4': 'Solve External Game'}¶
- name = 'New Game Menu'¶