That would really depend on what you want your wall to look like. Flat color? pattern? if pattern, using an image file or creating your own programatically? if using an image file, can it be scaled to size, or does it have to be drawn on a new image repeatedly? or can it be a transparent wall?
Your question is a bit confusing, is it that you're wanting some code which checks to see if the snake is hitting a certain object, or are you asking how to create objects/images which you can use as a wall to block the snake?