Manipulating Arrays


Hello again. This time I am representing a team fix that I just could not figure out myself. 

We wanted to implement an array of our mini games to be randomly picked from. This system would make sure that every mini game way played before resetting the list. Seems simple enough, however, I could not figure out the little bugs that were going on. I tried many different methods to no avail. making two lists and adding already played games to the second list. Skipping them if they came back around. Setting up two list and removing played games from one. When it was empty, I would refill it with the original list. Eventually, I settled on a minigame variable that saved the mini game to be played. removed that game from the playable list and then grabbed the needed mini game variable when it was ready to be used.

This seemed good but I was still getting repeats!!  By this time I informed the team of my failure and went to bed. Hoping that a good night's sleep could provide some insight.


To my surprise, I woke up to a series of messages between the teammate about possible issues/solutions! It turns out that somewhere in the logic the mini game list would get doubled. Even tripled! and that is where the repeats were coming from. The logic was all correct. The list just needed to be cleared before each new game started. Thank you Chris and Marcos. You guys are life savers!

Get Party Panic!

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.