def simContinue(state, timeLimit = None) :
    """Test if simulation should continue to next state:
    If time based: if simulation is after time limit
    If HP based: if enemy has HP left
    """
    if timeLimit is not None :
        return state['timeline']['timestamp'] <= timeLimit
    else :
        return state['enemy']['hp'] > 0