Home › Forums › JavaScript › Snake game ( separate snake body ) › Reply To: Snake game ( separate snake body )
August 4, 2013 at 2:13 pm
#145660
Kuzyo
Participant
The last result. I separated snakeHead from snakeBody( contains divs which will go after the snakeHead). And now every step coords of snakeHead goes to
gameObj.pastCoordarray. I' m trying to make that every step elements from
snakeObj.snakeBody arrayapply to elements from gameObj.pastCoord array. I hardcoded only for the first element from the snakeObj.snakeBody. And here is result http://codepen.io/Kuzyo/pen/pamzC