stratega.TBSForwardModel
- class stratega.TBSForwardModel
Is the default SGA::ForwardModel for TBS games, it contains specific methods.
- __init__(self: stratega.TBSForwardModel) None
Methods
__init__(self)add_lose_conditions(self, conditions)Adds a list of conditions for the game to be lost for a player.
add_on_entity_spawn_effect(self, ose)Adds an OnEntitySpawnEffect to the forward mode, which will be executed every time an entity is spawned.
add_on_tick_effect(self, ote)Adds an OnTickEffect to the forward mode, which will be executed every game tick.
add_win_conditions(self, conditions)Adds a list of conditions for the game to be won for a player.
advance_gamestate(*args, **kwargs)Overloaded function.
can_player_lost(self, state, player)Checks if a player has lost the game due to the game's lose conditions.
check_game_is_finished(self, state)Checks if the game is finished by current limit or because a player has won.
check_player_won(self, state, player)Returns if a player won the game by attending to the winning conditions defined in the rules.
end_turn(self, state)End the turn of the current player and if all the player has played it ends the current game turn.
generate_actions(*args, **kwargs)Overloaded function.
get_game_type(self)get_lose_conditions(self)Returns a list of sub-lists with all LOSE conditions.
get_on_entity_spawn_effects(self)Returns all effects that are exxecuted every time an entity is spawned in the game.
get_on_tick_effects(self)Returns all effects that are exxecuted on every tick of the game.
get_win_conditions(self)Returns a list of sub-lists with all WIN conditions.
spawn_entity(self, state, entityType, ...)Spawns an entity in the game with the default spawn entity method.