game
Class Game

java.lang.Object
  extended bygame.Game
Direct Known Subclasses:
BW_In_the_Lions_Den, C_Around_the_Mountain, C_Onslaught, C_Twilight_Sweep, K_Last_Stand

public class Game
extends java.lang.Object


Field Summary
static Game activeGame
           
 
Constructor Summary
Game()
           
 
Method Summary
 void addObject(java.lang.Object obj)
           
 void addPlayer(Player player)
           
 boolean arePlayersFriendly(int id1, int id2)
           
static boolean canUnitBeSeen(Unit end, java.util.Vector objects)
           
 boolean canUnitBeSeenByMyAllies(Unit end)
           
 boolean canUnitBeSeenByPlayerAllies(int playerID, Unit end)
           
static Body findClosest(Body start, java.util.Vector objects)
           
 Unit findClosestEnemyUnit(Body start)
           
 Unit findClosestUnit(Body start)
           
 java.lang.String getBriefingString()
           
static java.util.Vector getEnemyGuidedProjectiles(int id, java.util.Vector objects)
           
 java.util.Vector getEnemyPlayers(int playerID)
           
static java.util.Vector getEnemyUnits(int id, java.util.Vector objects)
           
 java.util.Vector getFriendlyPlayers(int playerID)
           
 Map getMap()
           
 Player getMe()
           
 int getMyID()
           
 Wing getMySelectedUnits()
           
 java.util.Vector getMyUnits(java.util.Vector objects)
           
 int getNumPlayers()
           
 java.util.Vector getObjects()
           
 Player getPlayer(int key)
           
 java.awt.Color getPlayerColor(int playerID)
           
 java.util.Vector getPlayers()
           
 java.util.Vector getPlayerUnits(int playerID)
           
 Wing getSelectedUnits()
           
 double getSpeed()
           
 java.lang.String getTitleString()
           
static java.util.Vector getUnits(java.util.Vector objects)
           
 int integrate()
           
 boolean isOmniscient()
           
 boolean isPlayerFriendly(int playerID)
           
 boolean isSelectedUnit(Unit u)
           
 void removeObject(java.lang.Object obj)
           
 void removePlayer(Player player)
           
 java.util.Vector searchByPosition(java.awt.Rectangle rect)
           
 void setMap(Map map)
           
 void setMe(Player me)
           
 void setSelectedUnits(java.util.Vector units)
           
 void setSpeed(double speed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeGame

public static Game activeGame
Constructor Detail

Game

public Game()
Method Detail

integrate

public int integrate()

getTitleString

public java.lang.String getTitleString()

getBriefingString

public java.lang.String getBriefingString()

getNumPlayers

public int getNumPlayers()

getObjects

public java.util.Vector getObjects()

addObject

public void addObject(java.lang.Object obj)

removeObject

public void removeObject(java.lang.Object obj)

searchByPosition

public java.util.Vector searchByPosition(java.awt.Rectangle rect)

findClosestEnemyUnit

public Unit findClosestEnemyUnit(Body start)

findClosestUnit

public Unit findClosestUnit(Body start)

getEnemyUnits

public static java.util.Vector getEnemyUnits(int id,
                                             java.util.Vector objects)

getEnemyGuidedProjectiles

public static java.util.Vector getEnemyGuidedProjectiles(int id,
                                                         java.util.Vector objects)

getPlayerUnits

public java.util.Vector getPlayerUnits(int playerID)

getMyUnits

public java.util.Vector getMyUnits(java.util.Vector objects)

getUnits

public static java.util.Vector getUnits(java.util.Vector objects)

findClosest

public static Body findClosest(Body start,
                               java.util.Vector objects)

canUnitBeSeenByMyAllies

public boolean canUnitBeSeenByMyAllies(Unit end)

canUnitBeSeenByPlayerAllies

public boolean canUnitBeSeenByPlayerAllies(int playerID,
                                           Unit end)

canUnitBeSeen

public static boolean canUnitBeSeen(Unit end,
                                    java.util.Vector objects)

getMySelectedUnits

public Wing getMySelectedUnits()

getSelectedUnits

public Wing getSelectedUnits()

setSelectedUnits

public void setSelectedUnits(java.util.Vector units)

isSelectedUnit

public boolean isSelectedUnit(Unit u)

getSpeed

public double getSpeed()

setSpeed

public void setSpeed(double speed)

getPlayer

public Player getPlayer(int key)

addPlayer

public void addPlayer(Player player)

removePlayer

public void removePlayer(Player player)

isPlayerFriendly

public boolean isPlayerFriendly(int playerID)

arePlayersFriendly

public boolean arePlayersFriendly(int id1,
                                  int id2)

getFriendlyPlayers

public java.util.Vector getFriendlyPlayers(int playerID)

getEnemyPlayers

public java.util.Vector getEnemyPlayers(int playerID)

getPlayerColor

public java.awt.Color getPlayerColor(int playerID)

setMe

public void setMe(Player me)

getMe

public Player getMe()

getMyID

public int getMyID()

getPlayers

public java.util.Vector getPlayers()

setMap

public void setMap(Map map)

getMap

public Map getMap()

isOmniscient

public boolean isOmniscient()