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

Report as inappropriate.

Wavesludge
Wavesludge presents ...

2012/11/28

Snake

Snake game
Move with the arrow keys, eat the grass and avoid the obstacles.

3468 views / 14 in the last 7 days

Tags: simulation with-source

open in greenfoot
Your browser does not support the canvas tag.
WavesludgeWavesludge

2012/11/28

Could anyone answer why the score counter doesn't show up until you get a point?
A new version of this scenario was uploaded on Thu Nov 29 11:16:49 UTC 2012 Snake can now implode
SSSSSS

2012/11/29

u may need some piece of code like this: scorecounter =new Scorecounter(); addObject(scorecounter,x,y); in ur world class :D
A new version of this scenario was uploaded on Thu Nov 29 23:14:54 UTC 2012
WavesludgeWavesludge

2012/11/29

Nope, didn't work :/
SSSSSS

2012/11/30

@Wavesludge it works :Di ve seen ur code and fix some values .The reason why it did not work is that in ur score class ,try like this values setImage(new GreenfootImage(200, 300)); img.drawString("Score " , 30, 30); Also, set a bigger number for the value in ur world class like this addObject(thisScore, 155, 150);

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.