game.core
Class Game
java.lang.Object
game.core.Game
public class Game
- extends java.lang.Object
Constructor Summary |
Game(Player p,
java.awt.Rectangle field)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
done
static java.util.TreeSet<java.lang.Integer> done
dt
public static double dt
time
double time
seed
private static long seed
rand
private static java.util.Random rand
forbiddn
private static int forbiddn
defaultPr
private static double defaultPr
pr
private static double pr
player
Player player
field
java.awt.Rectangle field
state
GameState state
currentGame
private static Game currentGame
screen
private GamePanel screen
graph
private boolean graph
alive
volatile boolean alive
initialNumberOfAsteroids
static int initialNumberOfAsteroids
Game
public Game(Player p,
java.awt.Rectangle field)
rand
public static final double rand()
gaussrand
public static final double gaussrand()
play
public GameData play()
- plays the game, returning the GameData at the end
draw
public void draw(java.awt.Graphics g)
setScreen
public void setScreen(GamePanel screen)
- Sets the screen of this game to be the specified component.
Also turns graphics on, if screen is not null, or off if it is.
It is the Component's responsibility to call draw(Graphics g) on
this Game object.
intrand
public static double intrand(double height)
getForbidden
public static int getForbidden()
setForbidden
public static void setForbidden(Game whosAsking)
setForbidden
private static void setForbidden()
getState
public GameState getState()
getInitialNumberOfAsteroids
public static int getInitialNumberOfAsteroids()
geomRand
public static int geomRand(double d)
stop
public void stop()