game.core.state.game_state

core/state/state.py

Defines the player and game state data structures.

Includes PlayerState for current location, fuel, hops, and distance, and GameState for overall game progress, quests, points, and system messages.

Classes

GameState(player, active_quest, ...)

Represents the overall state of the game.

PlayerState(location[, fuel, hops, km_total])

Represents the current state of the player.

class game.core.state.game_state.GameState(player: ~game.core.state.game_state.PlayerState, active_quest: ~game.core.entities.quest.Quest | None = None, completed_quests: ~typing.List[~game.core.entities.quest.Quest] = <factory>, points: int = 0, system_msg: str = '')

Bases: object

Represents the overall state of the game.

active_quest: Quest | None = None
completed_quests: List[Quest]
player: PlayerState
points: int = 0
system_msg: str = ''
to_dict() dict

Return the game state as dictionary.

class game.core.state.game_state.PlayerState(location: Airport, fuel: float = 100.0, hops: int = 0, km_total: float = 0.0)

Bases: object

Represents the current state of the player.

fuel: float = 100.0
hops: int = 0
km_total: float = 0.0
location: Airport