Simulator/src/model/map/shapes/PathShape.java
/**
	 * Determines if this shape intersect with another {@link PathShape}.
	 * 
	 * @param other
	 *            The other shape.
	 * @return True if they intersect, false otherwise.
	 */
Determines if this shape intersect with another  PathShape.

@param other
The other shape.
@return True if they intersect, false otherwise.
Determines if this shape intersect with another PathShape . @param other The other shape . @return True if they intersect false otherwise .
public boolean isCollision(PathShape other) {
		List<Position> firstCorners = getCorners();
		List<Position> secondCorners = other.getCorners();
		if (contains(secondCorners) || other.contains(firstCorners))
			return true;
		for (int i = 0; i < firstCorners.size(); i++) {
			if (other.isLineCollision(firstCorners.get(i), firstCorners.get((i + 1) % firstCorners.size())))
				return true;
		}
		return false;
	}
public boolean isCollision ( PathShape other ) { List < Position > firstCorners = getCorners ( ) ; List < Position > secondCorners = other . getCorners ( ) ; if ( contains ( secondCorners ) || other . contains ( firstCorners ) ) return true ; for ( int i = 0 ; i < firstCorners . size ( ) ; i ++ ) { if ( other . isLineCollision ( firstCorners . get ( i ) , firstCorners . get ( ( i + 1 ) % firstCorners . size ( ) ) ) ) return true ; } return false ; }
Determines if this shape intersect with another {@link PathShape}.
Determines if this shape intersect with another { @link PathShape } .
// check for containment in each other. // check for line intersections