Hello,
For my final project I was required to make a game on Greenfoot and I decided to make a game where i show the players a list of specific fruits they need to collect (E.g , in the list states that you have to collect 4 bananas,3 apples , etc) and they have to catch the required fruits that falls from the sky after which they have to press a button (space) to see if they have the exact numbers on each of the required fruits. If they do they will pass the level and if they don't they will lose a life.
As for my questions, I don't know what codes you need to use to check whether the players have the required fruits and numbers and the one that decides if they pass the level or lose a life.