hi,
You can't predict the number of laps, so you can't create fsm variables during editor time, what if they do one too many lap?
I think using arrayList makes perfect sense here.
Keeping track of the best lap should be done at the end of each lap then it's easy:
User finished a lap, is it quicker than the bext lap? yes store this new lap as the best lap ( and store maybe the lap number as well) else carry on.
Does that make sense?
the other way is two always feed two arrayList with laps and only sort one, then you know the quickest lap is index 0 of the sorted arrayList and you can get it's index from the non sorted arrayList to know which lap it was.
bye,
Jean