I'm trying to figure out functional code for my students game.
My goal is to eventually create a game where I can click on a fruit, and a for loop can check through each fruit adjacent, and determine whether or not it matches.
If it matches, and there are more than 2 matching fruit in a chain, then destroy all fruits that are in the chain.
What I'm trying so far, is to manually select fruit and check if all fruit in that selection match. If they do match, and they are right clicked, delete all the matching fruit. How would I manage just this?