Description
The contains method in src/util/Rectangle.mjs is defined twice.
- Once with inline logic.
- Once delegating to
this.constructor.includes.
This causes code duplication and confusion.
Proposed Change
- Remove the duplicate definition (the inline one).
- Update the remaining
contains method to explicitly use Rectangle.includes(this, other) instead of this.constructor.includes to match the style used in leavesSide and ensure correctness.
Acceptance Criteria
contains is defined only once.
contains delegates to the static includes method.
- Tests (if any) still pass.
Description The
containsmethod insrc/util/Rectangle.mjsis defined twice.this.constructor.includes.This causes code duplication and confusion.
Proposed Change
containsmethod to explicitly useRectangle.includes(this, other)instead ofthis.constructor.includesto match the style used inleavesSideand ensure correctness.Acceptance Criteria
containsis defined only once.containsdelegates to the staticincludesmethod.