Refactored logic for snake_intersects_with_itself
Refactored: introduced obstacles_hash