I have programmed a greedy snake game with 2 Actor classes: Head and SnakeBody.
The coordinates of the head are added to lists of SnakeBody objects that have been eaten step by step. Each SnakeBody object follows the list of the coordinate so that they all follow the trace of the head.
I use isKeyDown() to control the "one-step" movement of head and the SnakeBody (With speed of around 1.5 level). However, I realize only the head is well controlled. For the SnakeBody, I used the following statement (pseudo)
if :(Greenfoot.isKeyDown(up)
OR Greenfoot.isKeyDown(down)
OR Greenfoot.isKeyDown(left)
OR Greenfoot.isKeyDown(right))
then: moveAccordingToCoordList();
It seems there are three or four "bubbles" between the head the first eaten SnakeBody and there are occasional "bubbles" between SnakeBody as well.
I need urgent help! Thanx
