model
Class TuringExecutor

java.lang.Object
  extended by model.TuringExecutor

public class TuringExecutor
extends java.lang.Object

This class executes the current instruction and performs the neccessary updates

Author:
nadim

Constructor Summary
TuringExecutor(int head, TuringMap map)
          Takes the starting head position and the map to use
 
Method Summary
 void executeNextInstruction(TuringStateManager stateManager)
          Executings the next instruction based on the value of the position the head in on
 void moveHead(int direction)
          Calculates the direction in which the head will move.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TuringExecutor

public TuringExecutor(int head,
                      TuringMap map)
Takes the starting head position and the map to use

Parameters:
head -
map -
intialState -
Method Detail

executeNextInstruction

public void executeNextInstruction(TuringStateManager stateManager)
                            throws java.lang.Exception
Executings the next instruction based on the value of the position the head in on

Throws:
java.lang.Exception

moveHead

public void moveHead(int direction)
Calculates the direction in which the head will move.

Parameters:
direction -