Make allGems array into gem array, as there will only be one gem at a time (otherwise it gets too cluttered.);
Change socre variable into gemsCollected, which will keep track of nmber of gems collected and determine when to let star appear. This is to prepare for new score variable which will keep track of the players total score, with different colored gems accounting for different amounts of points.