I want to make an educational game about the 4 math operations and I'm trying to figure out the best way to do it. The game will show a result and the player needs to select the number options below as many as necessary, according to the mathematical operator being displayed,. For example: operator: sum / result: 10 / alternatives to be selected: 5, 3, 2, 1 and 4. In this case, the player could select 5, 4 and 1 or 5, 3 and 2
My solution, which is certainly not the best, would be to create a two-dimensional array for the 5 levels for each operator, to store a result and its respective alternatives/options, then use another array to randomize and delete the options each time they are displayed on the screen so that they don't repeat.
Is there a better solution? For example, one in which the system itself automatically creates a random result and also the alternatives for each result withou repetions? If not and I will really have to define all the results and alternatives, the way I intend to do this would be the best way to shuffle and avoid repeating the exercises?
I am looking for ideas/suggestions.