|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPrintGame.TuringMachine
class representing a turing machine.
Field Summary | |
static int |
CRAZY
|
static int |
FASTFORWARD
|
static int |
NORMAL
|
static int |
SINGLE_STEP
|
static int |
VERYFASTFORWARD
|
Constructor Summary | |
TuringMachine()
|
Method Summary | |
protected boolean |
checkCellIsStartpoint()
method checks if the robot's position is the startpoint. |
protected Condition |
getFieldConditions()
method returns the conditions of robot's environment |
int |
getNumSteps()
|
int |
getNumTakenDiamonds()
|
boolean |
isFinished()
|
protected boolean |
performAction(Action action)
method performes the given action and checks if the robot crashes |
void |
run(java.awt.Component component)
method processes an instruction list |
protected void |
runSingleStep(java.awt.Component component)
|
void |
setInstructionList(InstructionList instruct_list)
|
void |
setLabyrinthField(LabyrinthField lab_field)
|
void |
setMode(int mode)
|
void |
setNumNextSteps(int num_next_steps)
|
void |
setRobot(Robot robot)
|
void |
start(java.awt.Component component)
|
void |
takeAndCalcDiamonds()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SINGLE_STEP
public static final int FASTFORWARD
public static final int VERYFASTFORWARD
public static final int NORMAL
public static final int CRAZY
Constructor Detail |
public TuringMachine()
Method Detail |
protected Condition getFieldConditions()
protected boolean performAction(Action action)
action
- specifies what to do
public void setInstructionList(InstructionList instruct_list)
public void setRobot(Robot robot)
public void setLabyrinthField(LabyrinthField lab_field)
public void takeAndCalcDiamonds()
public void start(java.awt.Component component) throws java.lang.InterruptedException
java.lang.InterruptedException
public void run(java.awt.Component component) throws java.lang.InterruptedException
component
- window which contains the labyrinth field
java.lang.InterruptedException
protected void runSingleStep(java.awt.Component component) throws java.lang.InterruptedException
java.lang.InterruptedException
protected boolean checkCellIsStartpoint()
public void setMode(int mode)
public int getNumSteps()
public int getNumTakenDiamonds()
public boolean isFinished()
public void setNumNextSteps(int num_next_steps)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |