This is a candy game project that I was asked to do during "Data Structures and Algorithms" course.
You can run this code with any Java IDE. I used NetBeans.
- 1)You can crush candies only within the same stack.
- 2)You can crush same colored or same shaped candies.
- 3)You can only crush 3 candies that are side by side. (e.g. 4 candies won't be crushed even if the conditions of rule 2 are met.)
- 4)You can pop and push one candy at a time. You can push the candy to any other stack.
- 5)You can't pop and push a candy to the same stack. (e.g. Popping from Stack 1 and pushing to Stack 1 won't work.)
- 6)Next candy will always be added to the first stack.
Your goal is to crush as many candies as you can before the game ends. You'll earn 8 points for crushing 3 candies and 36 points for crushing 3 candies more than once simultaneously.