public GameStatesTypes NextMove(InputType input) { GameStatesTypes nextMove = _currentState.NextAction(input); _currentState = _currentState.NextState(input); return(nextMove); }
public SnakeStatesTypes NextMove(InputType input) { // Find next move from current state and input SnakeStatesTypes nextMove = _currentState.NextAction(input); // Find next state from current state and input _currentState = _currentState.NextState(input); return(nextMove); }
public DirectionType NextMove(InputType input) { // Find next move from current state and input DirectionType nextMove = _currentState.NextAction(input); // Find next state from current state and input _currentState = _currentState.NextState(input); return(nextMove); }
public StatesTypes NextMove() { // Find next move from current state and input StatesTypes nextMove = _currentState.NextAction(); // Find next state from current state and input _currentState = _currentState.NextState(); return(nextMove); }
// This shows that we're starting the game at Start. public GameStateMachine() { _currentState = new StateMachineStart(); }
public SnakeStateMachinePattern() { _currentState = new StateMachinePatternNorth(); }