OrodaelTurrim.Business package¶
Subpackages¶
Submodules¶
OrodaelTurrim.Business.Factory module¶
OrodaelTurrim.Business.GameEngine module¶
OrodaelTurrim.Business.GameMap module¶
OrodaelTurrim.Business.History module¶
OrodaelTurrim.Business.Logger module¶
OrodaelTurrim.Business.MapGenerator module¶
OrodaelTurrim.Business.Proxy module¶
-
class
OrodaelTurrim.Business.Proxy.GameObjectProxy(game_engine: GameEngine)[source]¶ Bases:
object-
get_active_effects(position: Position) → Optional[Dict[EffectType, int]][source]¶ Retrieves types of currently active effects and their durations on game object on specified position
Parameters: position – Position of queried game object Returns: Dict of types of active effects and associated remaining durations None if there is no unit at the position or you don’‘t see that position
-
get_attack_effects(position: Position) → Optional[Set[EffectType]][source]¶ Retrieves the types of effect to be applied to the target of attack of game object on specified position
Parameters: position – Position of queried game object Returns: Set of types of effect to be applied upon attacking None if there is no unit at the position or you don’t see that position
-
get_attribute(position: Position, attribute_type: AttributeType) → Optional[float][source]¶ Retrieves value of specified attribute of game object on specified position
Parameters: - position – Position of queried game object
- attribute_type – Type of attribute to be retrieved
Returns: Value of specified attribute None if there is no unit at the position
-
get_current_hit_points(position: Position) → Optional[float][source]¶ Retrieves amount of currently remaining hit points of game object on specified position
Parameters: position – Position of queried game object Returns: Amount of currently remaining hit points None if there is no unit at the position or you don’t see that position
-
get_income(player: PlayerTag) → int[source]¶ Retrieves income of given player
Parameters: player – Player whose income should be obtained Returns: Current income of given player None if player not registered
-
get_object_type(position: Position) → Optional[GameObjectType][source]¶ Retrieves the type of game object on the specified position. The player must see that position. This function could be used to get enemy types.
Parameters: position – Position of queried game object Returns: Type of game object on specified position GameObjectType.NONE if there is no unit at the position None if player don’t see that position
-
get_resistances(position: Position) → Optional[Set[EffectType]][source]¶ Retrieves the types of effect which will NOT affect game object on specified position
Parameters: position – Position of queried game object Returns: Set of resistances of game object on specified position None if there is no unit at the position or player don’t see that position
-
get_resources(player: PlayerTag) → int[source]¶ Retrieves current resources of given player
Parameters: player – Player whose resources should be obtained Returns: Current resources of given player None if player not registered
-
get_role(position: Position) → GameRole[source]¶ Retrieves the role of game object on specified position
Parameters: position – Position of queried game object Returns: Role of game object on specified position GameRole.NEUTRAL if there is no unit at the position, None if you don’t see that position
-
get_visible_enemies(position: Position) → Optional[Dict[Position, int]][source]¶ Retrieves map of distances to currently visible enemies by game object on specified position
Parameters: position – Position of queried game object Returns: Dictionary of visible position with enemy as a Kye and distance as a value Return None if there is no unit at the position, None if you don’t see target position
-
get_visible_tiles(position: Position) → Optional[Set[Position]][source]¶ Retrieves set of currently visible tiles of game object on specified position
Parameters: position – Position of queried game object Returns: Set of currently visible tiles None if there is no unit at the position, None if you don’t see target position
-
-
class
OrodaelTurrim.Business.Proxy.GameUncertaintyProxy(game_engine: GameEngine)[source]¶ Bases:
object
-
class
OrodaelTurrim.Business.Proxy.MapProxy(game_engine: GameEngine)[source]¶ Bases:
object-
compute_accessible_tiles(position: Position, actions: int) → Optional[Dict[Position, int]][source]¶ Computes map with accessible tiles as keys and remaining action points as values from specified position and number of remaining action points
Parameters: - position – Position to use as base point of computation
- actions – Number of action points to consider for computation
Returns: Dict with accessible tiles as keys and remaining action points as values None if positions is not on map
-
compute_visible_tiles(position: Position, sight: int) → Optional[Set[Position]][source]¶ Computes set of visible tiles in sight radius from given position.
Parameters: - position – Position to use as base point of computation
- sight – Value of sight to consider for computation
Returns: Set of visible tiles of specified game object. None if positions is not on map
-
get_bases_positions() → Set[Position][source]¶ Retrieves positions of defenders’ bases
Returns: Positions of defenders’ bases
-
get_player_visible_tiles() → Set[Position][source]¶ Retrieves set of visible tiles for player.
Returns: Set of visible tiles
-
get_terrain_type(position: Position) → Optional[TerrainType][source]¶ Retrieves terrain type of given position Return None if Positions is not on map
Parameters: position – Position to get terrain type for Returns: Terrain type of given position
-
is_position_occupied(position: Position) → bool[source]¶ Checks whether given position is occupied or not. You can check only visible positions
Parameters: position – Position to be checked Returns: True in case there is game object on given position, False otherwise, None if user did not see the position
-