Modify the checkForMatches: method by checking if the center of the shape is inside the shape container's path instead of the shape's starting point.
Add a method, calculatePathCenter:, to the Shape class. This method calculates the centroid of the points in the path, which is the average of the path points' values.