gizmoball.engine
Class GizmoBallEngine

java.lang.Object
  extended by gizmoball.engine.GizmoBallEngine

public class GizmoBallEngine
extends java.lang.Object

The GizmoBallEngine class simulates the laws of physics and models the interactions between gizmos in a gizmoball game. The engine object has an instance of GizmoBoard as a parameter and simulates the objects on the board for a length of time dt every time the tick() method is called.

Author:
Eitan Reich

Constructor Summary
GizmoBallEngine(GizmoBoard gb, double dt, double unitSize)
          Constructor for GizmoBallEngine Object
 
Method Summary
 GizmoBoard getBoard()
           
 void tick()
          Simulates the motion of objects in the GizmoBoard for time dt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GizmoBallEngine

public GizmoBallEngine(GizmoBoard gb,
                       double dt,
                       double unitSize)
Constructor for GizmoBallEngine Object

Parameters:
gb - GizmoBoard to opreate on
dt - length of time to simulate in each tick
unitSize - length used to compute gravity (0 for no gravity)
Method Detail

tick

public void tick()
Simulates the motion of objects in the GizmoBoard for time dt


getBoard

public GizmoBoard getBoard()
Returns:
the board being simulated