src/StateMachine.cpp
/*
 * Adds a state to the machine
 * It adds the state in sequential order.
 */
Adds a state to the machine
It adds the state in sequential order.
Adds a state to the machine It adds the state in sequential order .
State* StateMachine::addState(void(*functionPointer)()){
  State* s = new State();
  s->stateLogic = functionPointer;
  stateList->add(s);
  s->index = stateList->size()-1;
  return s;
}
State * StateMachine :: addState ( void ( * functionPointer ) ( ) ) { State * s = new State ( ) ; s -> stateLogic = functionPointer ; stateList -> add ( s ) ; s -> index = stateList -> size ( ) - 1 ; return s ; }
Adds a state to the machine
 It adds the state in sequential order.
Adds a state to the machine It adds the state in sequential order .