snake collides with wall
refactor