stratega.ActionAssignment

class stratega.ActionAssignment

A collection of action-assignments to entities and players in a game.

__init__(self: stratega.ActionAssignment) None

Methods

__init__(self)

assign_action_or_replace(self, newAction)

Assigns the action to the corresponding entity or player.

clear(self)

Deletes all assignments.

create_end_action_assignment(playerID)

Generates an ActionAssignment used by the game to end the tick/turn.

from_single_action(a)

Constructs a ActionAssignment from a single action, useful for TBS-Games.

get_assignment_count(self)

Returns the amount of actions that are assigned to entities and players.

get_entity_action(self, entityID)

Returns the assignment for an entity.

get_entity_actions(self)

get_player_action(self, playerID)

Returns the assignment for an player.

get_player_actions(self)

merge(self, merge)

Copies the given action-assignment into this object.