java.lang.Object | +--Group
class Group exists for groups, or so-called "stacks" of units. It is an abstract class; instances will normally be from subclasses.
| Field Summary | |
protected Environ |
environ
|
protected Planet |
planet
|
protected char |
side
|
protected char |
type
|
protected java.util.Vector |
units
|
| Constructor Summary | |
Group()
|
|
Group(Unit u)
|
|
| Method Summary | |
void |
add(Unit u)
add() adds a Unit to the Group |
protected boolean |
CheckEmpty()
Test whether Group is empty |
Environ |
getEnviron()
|
java.util.Vector |
getGroup()
accessor methods |
int |
getNumDetectedChars()
returns the number of detected characters in the group |
int |
getNumMilUnits()
getNumMilUnits() returns the number of MilitaryUnits in a vector |
int |
getNumUnits()
getNumUnits() returns the number (int) of units in the Group |
Planet |
getPlanet()
|
char |
getSide()
|
char |
getType()
|
boolean |
move(Charactr[] c,
Environ newEnv,
Group newGrp)
move() This move() method moves an array of Charactrs from one environ to another on the same planet (no spaceship is involved). |
boolean |
move(Charactr[] c,
Spaceship[] ships,
Environ newEnv,
Group newGrp)
move() This move() method moves an array of Charactrs from one environ to another using a spaceship(s). |
boolean |
move(MilitaryUnit[] units,
Charactr[] c,
Environ newEnv)
move() This move() method moves arrays of Military Units and Charactrs from one environ to another. |
boolean |
move(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Environ newEnv)
move() This move() method moves an array of Military Units, an array of Charactrs, and an array of Spaceships to the military group of the destination environ. |
boolean |
move(MilitaryUnit[] units,
Environ newEnv)
move() This move() method moves a MilitaryGroup from one environ to another. |
boolean |
move(MilitaryUnit[] units,
Spaceship[] ships,
Environ newEnv)
move() This variation of the move() method moves a MilitaryGroup and any unmanned spaceships being moved with it from environ to another. |
boolean |
moveGroupFromEnvironToOrbit(Charactr[] c,
Spaceship[] ships,
Orbit newEnv,
Group newGrp)
moveGroupFromEnvironToOrbit() This method moves an array of Charactrs from an orbit box to an orbit box using a spaceship(s). |
boolean |
moveGroupFromEnvironToOrbit(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Orbit newEnv)
moveGroupFromEnvironToOrbit() This method moves an array of Military Units, an array of Charactrs, and an array of Spaceships to the military group of the destination orbit box. |
boolean |
moveGroupFromEnvironToOrbit(MilitaryUnit[] units,
Orbit newEnv)
moveGroupFromEnvironToOrbit() This method moves a MilitaryGroup from an environ to an orbit box. |
boolean |
moveGroupFromOrbitToEnviron(Charactr[] c,
Spaceship[] ships,
Environ newEnv,
Group newGrp)
moveGroupFromOrbitToEnviron This method moves an array of Charactrs from an orbit box to an environ using a spaceship(s). |
boolean |
moveGroupFromOrbitToEnviron(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Environ newEnv)
moveGroupFromOrbitToEnviron() This method moves an array of Military Units, an array of Charactrs, and an array of Spaceships to the military group of the destination environ. |
boolean |
moveGroupFromOrbitToEnviron(MilitaryUnit[] units,
Environ newEnv)
moveGroupFromOrbitToEnviron() This method moves a MilitaryGroup from an orbit box to an environ. |
boolean |
moveGroupFromOrbitToOrbit(Charactr[] c,
Spaceship[] ships,
Orbit newEnv,
Group newGrp)
moveGroupFromOrbitToOrbit() This method moves an array of Charactrs from an orbit box to an orbit box using a spaceship(s). |
boolean |
moveGroupFromOrbitToOrbit(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Orbit newEnv)
moveGroupFromOrbitToOrbit() This method moves an array of Military Units, an array of Charactrs, and an array of Spaceships to the military group of the destination orbit box. |
boolean |
moveGroupFromOrbitToOrbit(MilitaryUnit[] units,
Orbit newEnv)
moveGroupFromOrbitToOrbit() This method moves a MilitaryGroup from an orbit box to an orbit box. |
void |
remove(Unit u)
remove() remove a Unit from the Group |
void |
setEnviron(Environ newEnv)
modifier methods |
void |
setPlanet(Planet newEnv)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Vector units
protected Environ environ
protected Planet planet
protected char type
protected char side
| Constructor Detail |
public Group()
public Group(Unit u)
| Method Detail |
public java.util.Vector getGroup()
public Environ getEnviron()
public Planet getPlanet()
public char getType()
public char getSide()
public int getNumMilUnits()
public void setEnviron(Environ newEnv)
public void setPlanet(Planet newEnv)
public int getNumUnits()
public void add(Unit u)
public void remove(Unit u)
public int getNumDetectedChars()
public boolean move(MilitaryUnit[] units,
Environ newEnv)
public boolean move(Charactr[] c,
Environ newEnv,
Group newGrp)
public boolean move(MilitaryUnit[] units,
Spaceship[] ships,
Environ newEnv)
public boolean move(MilitaryUnit[] units,
Charactr[] c,
Environ newEnv)
public boolean move(Charactr[] c,
Spaceship[] ships,
Environ newEnv,
Group newGrp)
public boolean move(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Environ newEnv)
public boolean moveGroupFromOrbitToEnviron(MilitaryUnit[] units,
Environ newEnv)
public boolean moveGroupFromOrbitToEnviron(Charactr[] c,
Spaceship[] ships,
Environ newEnv,
Group newGrp)
public boolean moveGroupFromOrbitToEnviron(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Environ newEnv)
public boolean moveGroupFromOrbitToOrbit(MilitaryUnit[] units,
Orbit newEnv)
public boolean moveGroupFromOrbitToOrbit(Charactr[] c,
Spaceship[] ships,
Orbit newEnv,
Group newGrp)
public boolean moveGroupFromOrbitToOrbit(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Orbit newEnv)
public boolean moveGroupFromEnvironToOrbit(MilitaryUnit[] units,
Orbit newEnv)
public boolean moveGroupFromEnvironToOrbit(Charactr[] c,
Spaceship[] ships,
Orbit newEnv,
Group newGrp)
public boolean moveGroupFromEnvironToOrbit(MilitaryUnit[] units,
Charactr[] c,
Spaceship[] ships,
Orbit newEnv)
protected boolean CheckEmpty()