java.lang.Object | +--Unit
Unit class
| Field Summary | |
protected int |
combat
|
protected Environ |
environ
|
protected Group |
group
|
protected char |
groupType
|
protected boolean |
isChar
|
protected boolean |
moved
|
protected java.lang.String |
name
|
protected Orbit |
orbit
|
protected char |
side
|
protected char |
unitType
|
| Constructor Summary | |
Unit()
Constructor Methods |
|
Unit(char s,
java.lang.String n,
int com,
Environ env,
Group g)
|
|
Unit(char side,
java.lang.String name,
int combat,
int nada)
|
|
| Method Summary | |
int |
getCombat()
getCombat() returns the combat ability (int) of the unit |
Environ |
getEnviron()
getEnviron() returns the current Environ that the unit is located on |
char |
getGroupType()
|
boolean |
getMoved()
getMoved() returns true if the unit has moved; false otherwise |
java.lang.String |
getName()
getName() returns the name (String) of the unit |
Orbit |
getOrbit()
getEnviron() returns the current Environ that the unit is located on |
char |
getSide()
getSide() returns the loyalty (char) of the unit |
char |
getUnitType()
|
boolean |
moveFromOrbitBox(Charactr c,
Environ newEnv,
Group dest)
moveFromOrbitBox() This method moves a Charactr from an orbit box to an environ. |
boolean |
moveFromOrbitBox(Charactr c,
Orbit newEnv,
Group dest)
moveFromOrbitBox() This method moves a Charactr from an orbit box to another orbit box. |
boolean |
moveFromOrbitBox(MilitaryUnit m,
Environ newEnv)
moveFromOrbitBox() This moveTo() method moves a military unit from an orbit box to environ. |
boolean |
moveFromOrbitBox(MilitaryUnit m,
Orbit newEnv)
moveFromOrbitBox() This moveTo() method moves a military unit from an orbit box to another. |
boolean |
moveFromOrbitBox(Spaceship ship,
Environ newEnv,
Group dest)
moveFromOrbitBox() This method moves a spaceship from an orbit box to an environ. |
boolean |
moveFromOrbitBox(Spaceship ship,
Orbit newEnv,
Group dest)
moveFromOrbitBox() This method moves a spaceship from an orbit box to another orbit box. |
boolean |
moveShip(Spaceship ship,
Environ newEnv,
Group dest)
moveShip() The moveShip() method moves a spaceship from one environ to another. |
boolean |
moveTo(Charactr c,
Environ newEnv,
Group dest)
moveTo() This moveTo() method moves a Charactr from one environ to another. |
boolean |
moveTo(MilitaryUnit m,
Environ newEnv)
moveTo() This moveTo() method moves a military unit from one environ to another. |
boolean |
moveToOrbitBox(Charactr c,
Orbit newEnv,
Group dest)
moveToOrbitBox() This method moves a Charactr from an environ to an orbit box. |
boolean |
moveToOrbitBox(MilitaryUnit m,
Orbit newEnv)
moveToOrbitBox() This method moves a military unit from an environ to an orbit box. |
boolean |
moveToOrbitBox(Spaceship ship,
Orbit newEnv,
Group dest)
moveToOrbitBox() This method moves a spaceship from an environ to an orbit box. |
boolean |
reactionMove(Charactr c,
Environ newEnv,
Group dest)
reactionMove() This method moves a charactr from one environ to another using the rules for reaction moves. |
boolean |
reactionMove(MilitaryUnit m,
Environ newEnv)
reactionMove() This method moves a military unit from one environ to another using the rules for reaction moves. |
void |
setEnviron(Environ newEnv)
|
void |
setGroupType(char c)
|
void |
setOrbit(Orbit newOrb)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected char side
protected char groupType
protected char unitType
protected java.lang.String name
protected int combat
protected Environ environ
protected Orbit orbit
protected Group group
protected boolean moved
protected boolean isChar
| Constructor Detail |
public Unit()
public Unit(char side,
java.lang.String name,
int combat,
int nada)
public Unit(char s,
java.lang.String n,
int com,
Environ env,
Group g)
| Method Detail |
public char getSide()
public java.lang.String getName()
public boolean getMoved()
public int getCombat()
public Environ getEnviron()
public Orbit getOrbit()
public void setEnviron(Environ newEnv)
public void setOrbit(Orbit newOrb)
public char getGroupType()
public char getUnitType()
public void setGroupType(char c)
public boolean moveShip(Spaceship ship,
Environ newEnv,
Group dest)
public boolean moveTo(MilitaryUnit m,
Environ newEnv)
public boolean moveTo(Charactr c,
Environ newEnv,
Group dest)
public boolean reactionMove(MilitaryUnit m,
Environ newEnv)
public boolean reactionMove(Charactr c,
Environ newEnv,
Group dest)
public boolean moveFromOrbitBox(MilitaryUnit m,
Environ newEnv)
public boolean moveFromOrbitBox(Charactr c,
Environ newEnv,
Group dest)
public boolean moveFromOrbitBox(Spaceship ship,
Environ newEnv,
Group dest)
public boolean moveFromOrbitBox(MilitaryUnit m,
Orbit newEnv)
public boolean moveFromOrbitBox(Charactr c,
Orbit newEnv,
Group dest)
public boolean moveFromOrbitBox(Spaceship ship,
Orbit newEnv,
Group dest)
public boolean moveToOrbitBox(MilitaryUnit m,
Orbit newEnv)
public boolean moveToOrbitBox(Charactr c,
Orbit newEnv,
Group dest)
public boolean moveToOrbitBox(Spaceship ship,
Orbit newEnv,
Group dest)