stratega.RTSForwardModel
- class stratega.RTSForwardModel
Is the default SGA::ForwardModel for RTS games, it contains specific methods.
- __init__(self: stratega.RTSForwardModel) 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.
find_path(self, state, startPos, endPos)Returns a Path inside the Navmesh between the start and end positons.
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.
move_entities(self, state)Moves all the entities that have a current path and they did not reach their destination.
resolve_entity_collisions(self, state)Resolves collisions between entities in a basic way computing the penetration depth and pushing them way in the opposite direction.
resolve_environment_collisions(self, state)Resolves collisions between entities and the tiles that are not walkable in a basic way computing the penetration depth and pushing them way in the opposite direction.
spawn_entity(self, state, entityType, ...)Spawns an entity in the game with the default spawn entity method.