class Obstacles{ ArrayList obs; //constructor Obstacles(){ obs=new ArrayList(); } //add obstacle void add(Obstacle o){ obs.add(o); } //check intersection boolean isIntersecting(Dot dot){ for(int i=0; i