simulation_InteractiveVersion.gameWorlds
Class GameWorldModel

java.lang.Object
  extended by simulation_InteractiveVersion.gameWorlds.GameWorldModel
Direct Known Subclasses:
BoringReverseWorld, BoringWorld, ChaosWorld, SkitteryWorld

public abstract class GameWorldModel
extends java.lang.Object

This interface encapsulates the definition of functionality for a data model for a game world. Such data models consist of a collection of possibly types of Sprites.

Author:
mb

Field Summary
static java.util.logging.Logger logger
           
 
Constructor Summary
protected GameWorldModel()
           
 
Method Summary
 void addAnotherSprite()
           
 void addListener(ModelListener listener)
          Add a listener to this model.
 void advanceNextState()
          Updates the data model to reflect whatever actions occur in the duration of one new frame.
 void drawCurrentState(java.awt.Graphics2D graphics)
           
 void notifyModelHasChanged()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static java.util.logging.Logger logger
Constructor Detail

GameWorldModel

protected GameWorldModel()
Method Detail

advanceNextState

public void advanceNextState()
Updates the data model to reflect whatever actions occur in the duration of one new frame. Draws the game world on the passed Graphics2D instance.


addListener

public void addListener(ModelListener listener)
Add a listener to this model.

Parameters:
listener -

notifyModelHasChanged

public void notifyModelHasChanged()

drawCurrentState

public void drawCurrentState(java.awt.Graphics2D graphics)

addAnotherSprite

public void addAnotherSprite()