thank you. and what about turn(Greenfoot.getRandomNumber(90) - 45);. i know its for turning randomly. if i change it to turn(Greenfoot.getRandomNumber(2) - 8); does it work. if yes, how?
The
(90)-45 one will turn in the range { -45, 44 }, which averages out close to the current facing directtion. More accurately would be
(91)-45, which would be balanced with a range { -45, 45 }. The
(2)-8 one give the range { -8, -7 }, which is always turning left with hardly any variance.