A range, 1, 2, 3, 4, 5, 6, 7, 8
(it can populate a Lua table if it makes it easier)
table = {1, 4, 3}
The possible random choice should be among 2, 5, 6, 7, 8
.
In Python I have used this to get it:
possibleChoices = random.choice([i for i in range(9) if i not in table])
Any ideas how to achieve the same in Lua?
Aucun commentaire:
Enregistrer un commentaire