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

2017/10/30

It says something is missing?

ferna8533 ferna8533

2017/10/30

#
public void act() { if(getIntersectingObjects(SnakeTail.class).size() > 0) { ((wall)(getWorld()); return; } else if (getX() == 51 || getY() == 51 || getX() == 0 || getY() == 0) { ((wall)(getWorld()); return; }
Super_Hippo Super_Hippo

2017/10/30

#
((wall)(getWorld()); You have 4 times ( and only 3 times ). Other than that, this line doesn't make much sense as it is right now.
danpost danpost

2017/10/30

#
I would like to see what the first line in your world construtor looks like (the 'super' line). Actually, better would be to provide the entire constructor. And Hippo is right. The stated line, as is, does nothing.
You need to login to post a reply.