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

2013/4/16

Changing snake demo 2

1
2
danpost danpost

2013/4/16

#
Sure, I do not mind. (thanks, and you are welcome).
JetLennit JetLennit

2013/4/16

#
now it doesnt rotate.....
danpost danpost

2013/4/17

#
Be more specific.
JetLennit JetLennit

2013/4/17

#
Look at the head here
danpost danpost

2013/4/17

#
OK, I added the last statement in the following:
private void setDirection()
{
    int holdDir = direction;
     direction = (Greenfoot.getRandomNumber(3) + 3 + holdDir) % 4;
    if (!canMove()) direction = holdDir;
    setRotation(90 * direction);
}
You need to login to post a reply.
1
2