Dec 18, 2023
For part 2 I think you could do that by initially create a per instance array and update the instance based on the score of each game (e.g. if the score of game 1 is 4, then you add instance for game 2/3/4/5 by game 1's instance number). That way the code would be much faster:
I attached my gist and see if that make sense to you.