Class MilitaryGroup

java.lang.Object
  |
  +--Group
        |
        +--MilitaryGroup

public class MilitaryGroup
extends Group

Jon Havstad Jesse Eyerman


Field Summary
 
Fields inherited from class Group
environ, planet, side, type, units
 
Constructor Summary
MilitaryGroup(char s)
          Constructor Method
 
Method Summary
 void Janitor(int index)
          Moves eliminated units to the Underworld and modifies Stack
 int MilitaryCombat(MilitaryGroup attacker)
          Military vs.
 int RakeAttack(int PDB_level)
          PDB vs Military Combat returns 0 if Military stack survives 1 if Military stack eliminated
 int TotalCombatStrength()
          Sums up the total strength of the combat units in the military strength unit
 
Methods inherited from class Group
add, CheckEmpty, getEnviron, getGroup, getNumDetectedChars, getNumMilUnits, getNumUnits, getPlanet, getSide, getType, move, move, move, move, move, move, moveGroupFromEnvironToOrbit, moveGroupFromEnvironToOrbit, moveGroupFromEnvironToOrbit, moveGroupFromOrbitToEnviron, moveGroupFromOrbitToEnviron, moveGroupFromOrbitToEnviron, moveGroupFromOrbitToOrbit, moveGroupFromOrbitToOrbit, moveGroupFromOrbitToOrbit, remove, setEnviron, setPlanet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MilitaryGroup

public MilitaryGroup(char s)
Constructor Method

Method Detail

MilitaryCombat

public int MilitaryCombat(MilitaryGroup attacker)
Military vs. Military Combat att: attacker def: defender = recipient of the method call env: location (might be replaced with code in function to check env) returns 0 if no Stack is eliminated 1 if rebel Stack is eliminated 2 if imperial Stack is eliminated


TotalCombatStrength

public int TotalCombatStrength()
Sums up the total strength of the combat units in the military strength unit


Janitor

public void Janitor(int index)
Moves eliminated units to the Underworld and modifies Stack


RakeAttack

public int RakeAttack(int PDB_level)
PDB vs Military Combat returns 0 if Military stack survives 1 if Military stack eliminated