Package horizons :: Package ai :: Package aiplayer :: Package strategy :: Module condition :: Class ConditionPirateRoutinePossible
[hide private]
[frames] | no frames]

Class ConditionPirateRoutinePossible

source code

Condition --+
            |
           ConditionPirateRoutinePossible

Currently always occurs, when pirate has more conditions/strategies to work on, this may change.

Instance Methods [hide private]
 
__init__(self, owner) source code
 
check(self, **environment)
Based on information contained in **environment, determine wheter given condition occurs.
source code
str
get_identifier(self, **environment)
Based on information contained in **environment return an Unique identifier for given condition.
source code
Class Variables [hide private]
    Inherited from Condition
  default_certainty = 1.0
  log = logging.getLogger("ai.aiplayer.combat.condition")
Method Details [hide private]

__init__(self, owner)
(Constructor)

source code 
Overrides: Condition.__init__

check(self, **environment)

source code 

Based on information contained in **environment, determine wheter given condition occurs.

Returns:
If the condition occurs: dictionary, else: None
Overrides: Condition.check
(inherited documentation)

get_identifier(self, **environment)

source code 

Based on information contained in **environment return an Unique identifier for given condition. User for checking whether given condition is already being resolved by a mission in progress.

Returns: str
unique identifier
Overrides: Condition.get_identifier
(inherited documentation)