well to check for collision you can do it many ways, you can check if a point is inside a rectangle, for example, if you take the X, Y, Width and Height of a object you can find out a rectangle,
X = 0
Y = 0
Width = 10
Height = 10
thats a 10 by 10 rectangle,
now if we had a block that is at position (2,4) with a width of 1 and height of 1, we will have a collision
now to do this you have to do a if statement
we have snake and block
snake[x = 0,y = 0,width = 10,height = 10]
block[x = 2,y = 4,width = 1,height = 1]
lets check for a point is inside a rectangle
if((block.x >= snake.x || block.x <= snake.w + snake.x) == true && (block.y >= snake.y || block.y <= snake.height + snake.y) == true)
{
//we have a collision
}
let me know if you need anymore help. Hope this helps