This site requires JavaScript, please enable it in your browser!
Greenfoot back
AaronG2109
AaronG2109 wrote ...

2016/12/3

How do you stop a game if an object disappears "eaten"

AaronG2109 AaronG2109

2016/12/3

#
I am a super noob at coding. I am making a game for a cat versus mouse game. I have the code for when the cat touches the mouse the mouse disappears, but I need code to end the game if the mouse eats all the bread in the world or the cat eats the mouse.
danpost danpost

2016/12/3

#
AaronG2109 wrote...
I need code to end the game if the mouse eats all the bread in the world or the cat eats the mouse.
This is almost the same as the issue in this discussion thread. At least, the answer is very similar.
rkr rkr

2016/12/3

#
you can always use:
1
    Greenfoot.stop();
You need to login to post a reply.