The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Snake game ( separate snake body ) Reply To: Snake game ( separate snake body )


The last result. I separated snakeHead from snakeBody( contains divs which will go after the snakeHead). And now every step coords of snakeHead goes togameObj.pastCoordarray. I' m trying to make that every step elements fromsnakeObj.snakeBody arrayapply to elements from gameObj.pastCoord array. I hardcoded only for the first element from the snakeObj.snakeBody. And here is result