Here is the code.
The problem is that all levels have a different subclass, so I have no idea how can I loop them. If you have any suggestions how my code can be more effective please let me know!
And another question, as the levels come with random generator, how could we note, which of the levels were before, in order to not have the same one twice?
as the levels come with random generator, how could we note, which of the levels were before, in order to not have the same one twice?
Better would be to keep track of which levels have yet to be had (using their int identifications) -- removing them as they are given. You will need some static content to do this.
The problem is that all levels have a different subclass, so I have no idea how can I loop them. If you have any suggestions how my code can be more effective please let me know!
Once the list is depleted, you can rebuild it to loop.