game.cli.renderer
cli/renderer.py
Handles drawing CLI elements for the flight game.
Includes map rendering, game status, command list, and console utilities.
Classes
|
Represents a renderer layer for the command line interface. |
- class game.cli.renderer.Renderer
Bases:
object
Represents a renderer layer for the command line interface.
- _divider(width: int = 60) str
- _fuel_progress_bar(current: int, max: int = 100) str
- _to_grid(lat: float, lon: float) tuple[int, int]
Convert latitude/longitude to grid coordinates.
- clear_console() str
Return escape codes to clear the console.
- draw_command_list(options_count: int = 5) str
Return a string with the list of available commands.
- draw_game_status(status: dict) str
Return a string of the current player’s location, hops, distance, and fuel.
- draw_map(current, target, airports: List) str
Return a string representing the map with current, target, and airports.
- prompt_continue() str
Return the prompt string for pausing the CLI.