How to do this in a better way ?
Hi there,
I'm searching a way to code one thing in the better way possible, in terms of optimisation. I have a "take or leave" (deal or no deal) 1.21.4 game, where the players that are not chosen to be the main player are replaced by armor stands with their heads. Following the next screen, for each box that hasn't a player behind, an armor stand with the head of one of my friends (listed in a random function code) is summoned...
The problem is i temporaly made it random, so more than 1 armor stand can choose the same head, but i would like each head to appear only 1 time, like if we remove it from a list and it can't be chosen anymore. I could code it hardcoded, but i'm sure there's a easy trick to auto that...
I know we can store many elements in a list, in a storage, but i just don't get how to remove elements randomly from it. Maybe you'll have ideas.
Thanks
Continue to help post