Game mode isn't actually refactored, as it's deleted. Instead I added a new class "CollectibleCounter" ("collectible_counter.js") that counts collectibles and updates global values.
There were many spagetti and I removed many unnecessary detours in condition checking.
Added clear_conditions.js, idea being that all condition checking happens in a file of it's own
As a bonus, multiple choice buttons now call "checkIfGameWon" from the new file, so they work as asked
I tried finding bugs, but I was worried because I didn't find them. Please test well.
I tried finding bugs, but I was worried because I didn't find them. Please test well.