snake handler: check collisions