Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Fight Class Reference

List of all members.

Detailed Description

this class is used to simulate combat using unit and building data Combat calculator

Author:
Robert Vock <smir@andaloria.de>

Roland Schmitt <>

Peter Schnebel <>

Definition at line 25 of file lib/fight.php.

Public Member Functions

 Fight ($booDebug=false)
 constructor.
 select ($strUnitData= ', $strTownData= ')
 prepare data and let the user select which units are attackers
 calc ($aUnits, $aAttackers, $aDefBoni, $aAttBoni)
 calculate possible fight outcome

Public Attributes

 $booDebug
 debug active?


Constructor & Destructor Documentation

Fight::Fight booDebug = false  ) 
 

constructor.

Parameters:
$booDebug should debug messages be enabled?

Definition at line 33 of file lib/fight.php.

References $booDebug.


Member Function Documentation

Fight::calc aUnits,
aAttackers,
aDefBoni,
aAttBoni
 

calculate possible fight outcome

Parameters:
$aUnits array with all units
$aAttackers array with townnames of attackers
$aDefBoni Boni for defenders
$aAttBoni Boni for attackers

Definition at line 207 of file lib/fight.php.

References $aAttackers, $aAttBoni, $aDefBoni, and $i.

Fight::select strUnitData = ',
strTownData = '
 

prepare data and let the user select which units are attackers

Parameters:
$strUnitData all copied info for units
$strTownData all copied info for town

Definition at line 50 of file lib/fight.php.

References $aAttBoni, $aDefBoni, $aUnits, $i, $intCount, and $strPlayer.


Member Data Documentation

Fight::$booDebug
 

debug active?

Definition at line 27 of file lib/fight.php.

Referenced by Fight().


The documentation for this class was generated from the following file:
Generated on Sun May 8 19:29:46 2005 for PhpMap by  doxygen 1.4.2