Class Environ

java.lang.Object
  |
  +--Location
        |
        +--Environ

public class Environ
extends Location


Field Summary
protected  int coupRating
           
protected  java.lang.String creature
           
protected  int environID
           
protected  boolean ishighMilUnitLevel
           
protected  java.lang.String[] races
           
protected  boolean reactionMoveOK
           
protected  int resourceRating
           
protected  int size
           
protected  Sovereign sovereign
           
protected  char type
           
 
Fields inherited from class Location
imperialCharGroup, imperialMilGroup, planet, rebelCharGroup, rebelMilGroup
 
Constructor Summary
Environ(int id, char t, int s, java.lang.String[] environRaces, int rating, boolean highLevel, java.lang.String environCreature, int environCoup)
          Constructor Method
 
Method Summary
 void addCharacter(Charactr c)
          addCharacter(Charactr c) adds a character to the environment, placing it in the correct CharacterGroup
 void addToMilGroup(MilitaryGroup m, Unit u)
          addToMilGroup() adds a Unit to a MilitaryGroup
static void CombatTest(int number)
           
static Environ get(int id)
          get(int) Returns Environ with matching ID
 java.lang.String getCreature()
          getCreature returns the name of the creature in that environ
 java.util.Vector getEnvironStarFaringRaces()
          getEnvironStarFaringRaces() Returns a list of StarFaring Races in Environ
 java.lang.String getRace(int i)
           
 boolean getReactionMoveOK()
          getReactionMoveOK() returns true if a reaction move is allowed; false otherwise
 int getSize()
          getSize() returns the size (int) of the environ (number of military units the environ can hold)
 java.lang.String getStringType()
          getStringType() returns the type (String) of the environ (urban, wild, etc.)
 char getType()
          getType() returns the type (char) of the environ (urban, wild, etc.)
 boolean hasMissionChars(char side)
          hasMissionChars() decides whether the environ has characters on it on the selected side
 boolean hasRace(java.lang.String race)
          hasRace(String) Returns if a race is in an environ
static void init()
          init() Initialize all Environ in game
 java.lang.String name()
           
 void removeCharacter(Charactr c)
          remove Character() removes a character from the environment
 java.lang.String removetype(java.lang.String race)
           
static void search(int PlayerTurn, Environ SEnviron)
           
static void search(int PlayerTurn, java.util.Vector planetVector)
           
 void setPlanet(Planet p)
          setPlanet() "joins" a planet
 void setReactionMoveOK(boolean b)
          getReactionMoveOK() returns true if a reaction move is allowed; false otherwise
 
Methods inherited from class Location
ConvertImperialCharGroup, ConvertRebelCharGroup, getImperialCharGroup, getImperialMilGroup, getNumImperialCharUnits, getNumImperialMilUnits, getNumRebelCharUnits, getNumRebelMilUnits, getPlanet, getRebelCharGroup, getRebelMilGroup, isInPlanet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

environID

protected int environID

type

protected char type

size

protected int size

races

protected java.lang.String[] races

resourceRating

protected int resourceRating

ishighMilUnitLevel

protected boolean ishighMilUnitLevel

reactionMoveOK

protected boolean reactionMoveOK

creature

protected java.lang.String creature

sovereign

protected Sovereign sovereign

coupRating

protected int coupRating
Constructor Detail

Environ

public Environ(int id,
               char t,
               int s,
               java.lang.String[] environRaces,
               int rating,
               boolean highLevel,
               java.lang.String environCreature,
               int environCoup)
Constructor Method

Parameters:
id - ID Number
t - Type
s - Size
environRaces - Races in Environ
rating - Resourse Rating
highLevel - Allows High level purchases
environCreature - Creatures
environCoup - Coup Rating
Method Detail

get

public static Environ get(int id)
get(int) Returns Environ with matching ID

Parameters:
id - Environ ID Number
Returns:
Environ

getSize

public int getSize()
getSize() returns the size (int) of the environ (number of military units the environ can hold)

Returns:
Size of Environ

getType

public char getType()
getType() returns the type (char) of the environ (urban, wild, etc.)

Returns:
Environ Type

getStringType

public java.lang.String getStringType()
getStringType() returns the type (String) of the environ (urban, wild, etc.)

Returns:
String Version of Environ Type

getRace

public java.lang.String getRace(int i)

getReactionMoveOK

public boolean getReactionMoveOK()
getReactionMoveOK() returns true if a reaction move is allowed; false otherwise


getCreature

public java.lang.String getCreature()
getCreature returns the name of the creature in that environ

Returns:
Creature in Environ

addToMilGroup

public void addToMilGroup(MilitaryGroup m,
                          Unit u)
addToMilGroup() adds a Unit to a MilitaryGroup


addCharacter

public void addCharacter(Charactr c)
addCharacter(Charactr c) adds a character to the environment, placing it in the correct CharacterGroup


removeCharacter

public void removeCharacter(Charactr c)
remove Character() removes a character from the environment


setReactionMoveOK

public void setReactionMoveOK(boolean b)
getReactionMoveOK() returns true if a reaction move is allowed; false otherwise


setPlanet

public void setPlanet(Planet p)
setPlanet() "joins" a planet

Overrides:
setPlanet in class Location
Parameters:
p - Planet

name

public java.lang.String name()

getEnvironStarFaringRaces

public java.util.Vector getEnvironStarFaringRaces()
getEnvironStarFaringRaces() Returns a list of StarFaring Races in Environ

Returns:
Vector of StarFaring Races

hasRace

public boolean hasRace(java.lang.String race)
hasRace(String) Returns if a race is in an environ

Parameters:
race - Race searching for
Returns:
True - In Environ, False - Not in Environ

removetype

public java.lang.String removetype(java.lang.String race)

init

public static void init()
init() Initialize all Environ in game


search

public static void search(int PlayerTurn,
                          java.util.Vector planetVector)

search

public static void search(int PlayerTurn,
                          Environ SEnviron)

CombatTest

public static void CombatTest(int number)

hasMissionChars

public boolean hasMissionChars(char side)
hasMissionChars() decides whether the environ has characters on it on the selected side