I fixed snake collisions with food and snakeHeadX, Y values.