question: public boolean collidesOnLine ( final int x1 , final int y1 , final int x2 , final int y2 ) { List < Point > points ; if ( ( x1 < x2 ) || ( ( x1 == x2 ) && ( y1 < y2 ) ) ) { points = Line . renderLine ( x1 , y1 , x2 , y2 ) ; } else { points = Line . renderLine ( x2 , y2 , x1 , y1 ) ; } for ( final Point point : points ) { if ( collides ( ( int ) point . getX ( ) , ( int ) point . getY ( ) ) ) { return true ; } } return false ; }
target:  Checks if there is a collision on the airline between 2 positions. Only the collision map will be used.