I'm new to Greenfoot. I'm doing a college project and in this project our criteria is to create an educational game. The game i intend to make is very simple - The 'main_character' has to get from point A across to point B, via Jumping onto wood, without falling through the gaps, into the 'river'.
In order to make it educational. I was trying to implement some sort of Question & Answer action. So, if the character falls into the river then 'Ask them a Question i.e. "12 x 12 =" and they would be given with four options to choose from. If they select correct answer then "Correct, You get Another Try" (Set Character back to original start point) else "Incorrect, you Lose!". - I went on YouTube and got the code to create a simple looking 'Q&A' Class, I put it in an array, so I can add multiple questions, easily.
The Problem is, I don't know how to LINK it to the 'character'. So if Character > Falls into River > Run 'Q&A' class. (I need to know what I would have to do inorder to ensure the 'Q&A' class runs.