void Step() {
	if (!diagram.done) {
	    counter += 1;
	    int index = FSMIndex();
	    if (index >= 0) {
		int outputs[] = fsm.Outputs(index);
		if (outputs != null) {
		    // then move
		    if (outputs[0] != '0') diagram.Up();
		    if (outputs[1] != '0') diagram.Down();
		    if (outputs[2] != '0') diagram.OpenDoor();
		    if (outputs[3] != '0') diagram.CloseDoor();
		    // see what we've found
		    diagram.Update();
		    if (diagram.done) stop = true;
		}
		state = fsm.NextState(index);
		if (state == null) state = "start";
	    } else {
		// issue complaint here
		stop = true;
	    }
	}
    }