Which data structure should be best used to store a pile of tiles from which a player can pick a random tile?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
I'd suggest any container that has random access (wikipedia), for example a plain array, vector, or deque.
or
This will allow you to select a random element without having to step through the container. I have left a comment asking for more information, if more information is added I'll update this answer. |
||||
|
|
