(int numStates)
| 415 | } |
| 416 | |
| 417 | public void rewind(int numStates) { |
| 418 | boolean resume = computer.pause(); |
| 419 | State state = alphaState.tail; |
| 420 | while (numStates > 0 && state.previousState != null) { |
| 421 | state = state.previousState; |
| 422 | numStates--; |
| 423 | } |
| 424 | state.apply(); |
| 425 | alphaState.tail = state; |
| 426 | state.nextState = null; |
| 427 | Video.forceRefresh(); |
| 428 | System.gc(); |
| 429 | if (resume) { |
| 430 | computer.resume(); |
| 431 | } |
| 432 | } |
| 433 | } |
no test coverage detected