Hello, complete Noob here with C#. Coded in Basic 25 years ago. Started C# 2 days ago for fun to create an app for personal use. Need to be able to hit a button and return a random item from a list. Then when I hit the button again return a different item excluding the first item and so on until all items are exhausted. The specific application is going to choose a monster to activate in a board game then another monster etc until the round is over then it will reset.
I can think of ways to do it like assign numbers and choose a random number. Then when I hit the button again, if it chooses the same number I can have it “reroll” until it chooses a different one. This seems inelegant and likely to slow down the program.
Is there an efficient way to do it?
I can think of ways to do it like assign numbers and choose a random number. Then when I hit the button again, if it chooses the same number I can have it “reroll” until it chooses a different one. This seems inelegant and likely to slow down the program.
Is there an efficient way to do it?