Class Game

java.lang.Object
  |
  +--Game

public class Game
extends java.lang.Object

The game class and it's sub-classes are very important game initialization and the sequence of play. A class digaram of the game class can be found here.

Other relevant documentation on the flow of the game sequence of play can be found here.


Field Summary
 int currentGameTurn
           
 int currentImperialForcePoints
           
 int currentRebelForcePoints
           
protected  int currentVictoryPoints
           
 boolean done
           
 java.util.Vector EnvironVector
          the requested vector of all the environs currently in play
 java.lang.String gameName
          holds egrix, varu, name of saved game, etc
 char gameType
          gameType: 's' = star system game 'p' = province system game 'g' = galactic game
 Group imperialUnits
           
 int initialImperialForcePoints
           
 int initialRebelForcePoints
           
 boolean instantVictory
           
 boolean interphase
           
 boolean missionsPhase
           
static int NumPlayerTurns
           
 boolean operationsPhase
           
 java.util.Vector PlanetVector
          the requested vector of all the planets currently in play
 int playerTurn
          1 = human 2 = ai
 Group rebelUnits
           
 char scenarioType
          scenario type: 'a' = Armageddon 'r' = start Rebellion
 boolean searchPhase
           
static boolean[] segments
           
 java.util.Vector StarSystemVector
          the requested vector of all the star systems currently in play
 int totalGameTurns
           
protected  int totalVictoryPoints
           
 int winner
          0 = no winner 1 = human, and other odd numbers 2 = ai, and other even numbers greater than zero
 
Constructor Summary
Game(java.lang.String sourceFile)
          constructor for game class: takes name of file from which to get data for game initialization name of file must include appropriate suffix for the time being, it ends the program if the source file isn't found.
 
Method Summary
 int getPlayerTurn()
           
static void main(java.lang.String[] args)
          test main, this function is unimportant
 void PhaseChange()
          The methods below handle the game flow Checks for stuff like victory points still needs to be added May also add checks in for the 'DONE' button
 void setSegments(int i)
           
 void UpdateGameTurns()
           
 void updatePhase()
           
 void UpdatePlayerTurn()
           
 void WhoWon(int x)
           
 void Winner(int win)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

StarSystemVector

public java.util.Vector StarSystemVector
the requested vector of all the star systems currently in play


PlanetVector

public java.util.Vector PlanetVector
the requested vector of all the planets currently in play


EnvironVector

public java.util.Vector EnvironVector
the requested vector of all the environs currently in play


done

public boolean done

initialImperialForcePoints

public int initialImperialForcePoints

currentImperialForcePoints

public int currentImperialForcePoints

initialRebelForcePoints

public int initialRebelForcePoints

currentRebelForcePoints

public int currentRebelForcePoints

totalGameTurns

public int totalGameTurns

currentGameTurn

public int currentGameTurn

playerTurn

public int playerTurn
1 = human 2 = ai


winner

public int winner
0 = no winner 1 = human, and other odd numbers 2 = ai, and other even numbers greater than zero


gameType

public char gameType
gameType: 's' = star system game 'p' = province system game 'g' = galactic game


scenarioType

public char scenarioType
scenario type: 'a' = Armageddon 'r' = start Rebellion


searchPhase

public boolean searchPhase

operationsPhase

public boolean operationsPhase

missionsPhase

public boolean missionsPhase

interphase

public boolean interphase

instantVictory

public boolean instantVictory

totalVictoryPoints

protected int totalVictoryPoints

currentVictoryPoints

protected int currentVictoryPoints

segments

public static boolean[] segments

NumPlayerTurns

public static int NumPlayerTurns

gameName

public java.lang.String gameName
holds egrix, varu, name of saved game, etc


imperialUnits

public Group imperialUnits

rebelUnits

public Group rebelUnits
Constructor Detail

Game

public Game(java.lang.String sourceFile)
constructor for game class: takes name of file from which to get data for game initialization name of file must include appropriate suffix for the time being, it ends the program if the source file isn't found. Maybe we'll get around to changing that later.

Method Detail

getPlayerTurn

public int getPlayerTurn()

main

public static void main(java.lang.String[] args)
test main, this function is unimportant


PhaseChange

public void PhaseChange()
The methods below handle the game flow Checks for stuff like victory points still needs to be added May also add checks in for the 'DONE' button


UpdateGameTurns

public void UpdateGameTurns()

UpdatePlayerTurn

public void UpdatePlayerTurn()

setSegments

public void setSegments(int i)

updatePhase

public void updatePhase()

WhoWon

public void WhoWon(int x)

Winner

public void Winner(int win)