game.core.game
core/game.py
Core game logic for the flight game.
Defines the Game class that manages game state, player actions, quests, airports, and events.
Classes
|
Represents the flight game. |
- class game.core.game.Game
Bases:
object
Represents the flight game.
- COUNTRY = 'FI'
- FUEL_PER_KM: float = 0.08
- FUEL_TAKEOFF_LANDING: float = 2.0
- START_FUEL: float = 100.0
- START_ICAO = 'EFHK'
- _consume_fuel_for_leg(dist_km: float) float
- _issue_new_quest() None
Select and assign new active quest for the player.
- _viable_target_option(airport: Airport, target: Airport) bool
Check if flying to airport moves closer to the target.
- add_event_message(msg: str) None
Append messages produced by game events to the queue.
- exit_game() None
Stop the game.
- is_running() bool
Check if game is running.
- options(limit: int = 5) List[Tuple[Airport, float]]
Return a list of viable airports to fly to with distances in kms.
- pick(index: int) Airport | None
Fly to the chosen airport by index and trigger events and handle quests.
- remaining_distance_to_target() int | None
Remaining distance to the target airport (rounded km).
- start() None
Start the game, initalize game state and assign first quest.
- status() dict
Return current game status as dictionary.