As F-ES Sitecore suggests, a class - based approach would work better.
Define an abstract State class which declares an abstract DoWork method, taking as a parameter the "machine info" class which describes the information the states will operate on, if any and returning a State instance.
Then for each state you need, define a new class derived from the State class and implement the DoWork method for each.
All you have to do then is:
protected void RunAlgorithm(Func<object> nextState)
State currentState = new FirstState();
while (currentState != null)
currentState = currentState.DoWork(machineInfo);
The system will sort out which DoWork method it needs to call each time.