Update the Question game - RandomList() function
@@ -153,14 +153,13 @@ func IncreaseScore
func RandomList aInput
aOutput = []
- while len(aInput) > 0
- nIndex = 0
- while nIndex = 0
- nIndex = random( len( aInput) )
- end
+ while len(aInput) > 1
+ nIndex = random(len(aInput)-1)
+ nIndex++
aOutput + aInput[nIndex]
del(aInput,nIndex)
end
+ aOutput + aInput[1]
return aOutput
func CloseApp
