game.cli.main
cli/main.py
Entry point and main loop for the Flight Game (cli).
Handles: - Main menu - Game loop - Option display with distance deltas - Colorized CLI output - Command input handling
Functions
|
Run the flight game main menu and main loop. |
- game.cli.main._clear_console(renderer)
Clear the console using renderer escape codes.
- game.cli.main._colorize_line(line_text: str, delta_val: int | None, is_best: bool, target: bool) str
Return a colorized line for an option based on delta, target, and best choice.
- Parameters:
line_text (str) – The option text to colorize.
delta_val (Optional[int]) – Distance improvement compared to current location.
is_best (bool) – Whether this is the best next hop.
target (bool) – Whether this option is the current quest target.
Display the main menu and return the chosen action.
- game.cli.main.main()
Run the flight game main menu and main loop.