|
if obj.runNumber >= obj.maxRepetitions |
|
nextState = obj.nextStateAfterMaxRepetitions; |
Currently runNumber will no be reset in any case. A reset method would be helpful if the next state after max run number is some state before the current state. In this case the counter should be reset to zero.
Certainly a bit dangerous because it could results in infinite loop