lane.sente
Class RobotCube

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--lane.sente.RobotCube
All Implemented Interfaces:
RobotContainer, java.lang.Runnable

public class RobotCube
extends java.lang.Thread
implements RobotContainer


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RobotCube(int xbound, int ybound, int zbound)
          the constructor for the "cube" (Shouldn't it just need one int then?)
 
Method Summary
 void addElement(GameElement e)
          adds a Game Element to the cube
 float getXfraction(int x)
          returns the fraction of that x value along the x axis of the cube's
 float getYfraction(int y)
          returns the fraction of that y value along the y axis of the cube's
 float getZfraction(int z)
          returns the fraction of that z value along the z axis of the cube's
static void main(java.lang.String[] args)
          testing routine
 void run()
          Main loop to keep the game running
 void setRunning(boolean value)
          tells the cube to either start or stop running
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RobotCube

public RobotCube(int xbound,
                 int ybound,
                 int zbound)
the constructor for the "cube" (Shouldn't it just need one int then?)
Parameters:
xbound - The dimension in the x axis
ybound - The dimension in the y axis
zbound - The dimension in the z axis
Method Detail

run

public void run()
Main loop to keep the game running
Overrides:
run in class java.lang.Thread

addElement

public void addElement(GameElement e)
adds a Game Element to the cube
Specified by:
addElement in interface RobotContainer
Parameters:
e - The game element to add

main

public static void main(java.lang.String[] args)
testing routine
Parameters:
-  

setRunning

public void setRunning(boolean value)
tells the cube to either start or stop running
Parameters:
value - True makes it run, false makes it stop

getXfraction

public float getXfraction(int x)
returns the fraction of that x value along the x axis of the cube's
Specified by:
getXfraction in interface RobotContainer
Parameters:
x - The x location
Returns:
The fraction x is along the cube's x axis

getYfraction

public float getYfraction(int y)
returns the fraction of that y value along the y axis of the cube's
Specified by:
getYfraction in interface RobotContainer
Parameters:
y - The y location
Returns:
The fraction y is along the cube's y axis

getZfraction

public float getZfraction(int z)
returns the fraction of that z value along the z axis of the cube's
Specified by:
getZfraction in interface RobotContainer
Parameters:
z - The z location
Returns:
The fraction z is along the cube's x axis