game
Class DiscreteGame

java.lang.Object
  extended by game.DiscreteGame
Direct Known Subclasses:
DoubleAuction

public abstract class DiscreteGame
extends java.lang.Object

Represents the necessary time and step functions of a discrete game.

Author:
tratch

Constructor Summary
DiscreteGame(int length)
          Constructor
 
Method Summary
 int getCurrentPeriod()
           
 int getGameLength()
           
abstract  void run()
          Should iterate over each step.
abstract  void step()
          This method dictates what will happen in one game turn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteGame

public DiscreteGame(int length)
Constructor

Parameters:
length -
Method Detail

getCurrentPeriod

public int getCurrentPeriod()
Returns:
the current period the game is in

getGameLength

public int getGameLength()
Returns:
the number of steps the game will iterate over before completion

run

public abstract void run()
Should iterate over each step. A specific game that implements this class will specify how.


step

public abstract void step()
This method dictates what will happen in one game turn