demo.inpro.system.greifarm
Class GreifarmController

java.lang.Object
  extended by demo.inpro.system.greifarm.GreifarmController

public class GreifarmController
extends java.lang.Object

this encapsulates greifarmController control and only exposes the task-dependent actions


Field Summary
 DropListener dropListener
           
private  GameScore gamescore
           
private  GreifArmGUI greifarmGUI
           
private  double greifarmPosition
           
private  boolean hasControl
          this is set to false by drop() and set to true by the reset command
private  org.apache.log4j.Logger logger
           
private  java.util.Random rand
           
 
Constructor Summary
GreifarmController(GameScore gamescore)
           
 
Method Summary
 void drop()
           
 double getCurrentPosition()
           
protected  int getDistanceToGoal()
           
 double getGoalPositionFor(double amount)
           
 javax.swing.JComponent getVisual()
           
 void moveTo(double position)
           
 void reset()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private final org.apache.log4j.Logger logger

dropListener

public DropListener dropListener

greifarmGUI

private GreifArmGUI greifarmGUI

rand

private java.util.Random rand

greifarmPosition

private double greifarmPosition

hasControl

private boolean hasControl
this is set to false by drop() and set to true by the reset command


gamescore

private GameScore gamescore
Constructor Detail

GreifarmController

GreifarmController(GameScore gamescore)
Method Detail

getVisual

public javax.swing.JComponent getVisual()

reset

public void reset()

drop

public void drop()

stop

public void stop()

getDistanceToGoal

protected int getDistanceToGoal()

getCurrentPosition

public double getCurrentPosition()

getGoalPositionFor

public double getGoalPositionFor(double amount)

moveTo

public void moveTo(double position)