Refactoring+ adding method AddObstacle()