stratega.Player

class stratega.Player

Contains all the implementation of a player. Usefull to check the attached actions and the parameters assigned to the player.

__init__(self: stratega.Player, id: int, canPlay: bool) None

Methods

__init__(self, id, canPlay)

add_attached_action(self, actionTypeID, ...)

Adds a new attached action to this player.

add_continuous_action(self, newAction)

Adds a continuous action to the list of this player.

advance_continuous_action(self, idx)

Advances the tick counter of the continuous action with index 'idx'

can_execute_action(self, actionTypeID)

Indicates if a given action type can be executed by this player.

can_play(self)

Indicates if this player can play at this time.

get_action_info(self, actionTypeID)

Returns the ActionInfo of an action type this player can execute.

get_attached_action(self, idx)

Returns the action info of the attached action with index 'idx'.

get_attached_actions(self)

Returns the list of attached actions to this player.

get_continuous_actions(self)

Returns the list of continuous actions this player is executing.

get_id(self)

Returns the ID of this player

get_neutral_player_id()

Returns the player ID defined for a neutral player.

get_parameter(self, arg0)

Returns a const value of a parameter of this player.

get_parameters(self)

Returns the list of parameters, can't be modified.

remove_continuous_action(self, idx)

Sets a size for the vector of parameters of this player.

res_attached_actions(self, cap)

Reserves space for attached actions.

set_action_last_tick(self, idx, lastTick)

Sets the last tick on an attached action, indexed by 'idx'

set_can_play(self, can)

Sets if the player can play now or not.

set_parameter(self, paramIdx, val)

Sets the parameter of this player to a certain value