game.core
Class Game

java.lang.Object
  extended by game.core.Game

public class Game
extends java.lang.Object


Field Summary
(package private)  boolean alive
           
private static Game currentGame
           
private static double defaultPr
           
(package private) static java.util.TreeSet<java.lang.Integer> done
           
static double dt
           
(package private)  java.awt.Rectangle field
           
private static int forbiddn
           
private  boolean graph
           
(package private) static int initialNumberOfAsteroids
           
(package private)  Player player
           
private static double pr
           
private static java.util.Random rand
           
private  GamePanel screen
           
private static long seed
           
(package private)  GameState state
           
(package private)  double time
           
 
Constructor Summary
Game(Player p, java.awt.Rectangle field)
           
 
Method Summary
 void draw(java.awt.Graphics g)
           
static double gaussrand()
           
static int geomRand(double d)
           
static int getForbidden()
           
static int getInitialNumberOfAsteroids()
           
 GameState getState()
           
static double intrand(double height)
           
 GameData play()
          plays the game, returning the GameData at the end
static double rand()
           
private static void setForbidden()
           
static void setForbidden(Game whosAsking)
           
 void setScreen(GamePanel screen)
          Sets the screen of this game to be the specified component.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

Game

public Game(Player p,
            java.awt.Rectangle field)
Method Detail

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()