This week I teamed up with Doo Yon Kim (Don) to create a game that we call – “Fish or Bee”. We both decided to create two individual games that we then merged into one sketch. This was the most challenging part. Don did an excellent job of combining the two using the if function – where when one game plays the other game’s values or coordinates would become 0 (i.e. not appear on the screen).
I did another iteration of combining the two games using “Switch” and “Case”. I made a variable – gameMode that i wanted to switch. I made 3 cases for it:
0 – Selection Page ( function displayReadyMode )
1 – Fish Game ( function displayFishGame )
2 – Bee Game ( function displayBeeGame )
Each case corresponds to a custom function that is called based on a mousePressed function.
Following is the code for my individual game – Fish Game:
Thanks to J.H Moon for all the help with combining the two games and to Don for helping me out with the little glitches.