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

Class ConditionHostile

source code

Condition --+
            |
           ConditionHostile

States whether there is a hostile player that can be attacked (i.e. has ships that can be destroyed)

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)