here is my code, its like playing BINGO, the result is, all the numbers used only ONCE.
there are 15 numbers or “BALLS”
No number is called twice
I only hit the return key 8 times instead of 15
cant figure it out
set bingo_numbers to {“B01”, “B02”, “B03”, “B04”, “B05”, “B06”, “B07”, “B08”, “B09”, “B10”, “B11”, “B12”, “B13”, “B14”, “B15”} as list
set called_numbers to {} as list
set count_of_called_numbers to 1
repeat until count_of_called_numbers is 15
set randomChoice to some item of bingo_numbers
if randomChoice is not in called_numbers then
display dialog randomChoice
else
repeat until randomChoice is not in called_numbers
set randomChoice to some item of bingo_numbers
end repeat
end if
set called_numbers to called_numbers & randomChoice
set count_of_called_numbers to count_of_called_numbers + 1
end repeat
called_numbers