I have been stuck on this problem for a week now.
I have two 2D arrays: Questions Array and Bool Array
Questions Array contains riddles that are categorized by their difficulty.
The Bool Array contains the same dimensions of Questions array but only hold the bool datatype.
A question randomizer randomizes the array indexes but first checks the Bool Array if the indexes contains false. If it does, it then proceeds to use the same randomized indexes to the Questions array then displays the question. If the element of the Bool Array is true it then repeats the randomizing process.
Whenever the player answers a riddle correctly, the game takes the same array index of the riddle and then finds it in the bool array so it would change its element to true.
Now here comes my problem, I need a way to save the contents of the bool array so that whenever the player restarts the game, all of the previously answered questions remain answered.
I have tried utilizing JSONs but I think I may be doing it wrong. I tried converting the Bool Array to a flat list then send that list into a JSON file but when I go and print the JSON file it only contains “{}”.
Is there a better way to save a 2D array? Is there a better way to track the player’s progression based on the conditions required? Honestly, programming is not my forte but I am willing to learn. Any help would do thank you!