hashCode property

  1. @override
int get hashCode
override

Hash code implementation following Dart's hash code contract:

  1. Consistent: same object ⇒ same hash code
  2. Collision-minimizing: different objects ⇒ different hash codes when possible

Uses bitwise XOR (^) which provides good distribution for grid coordinates: hash = x.hashCode ^ y.hashCode

Implementation

@override
int get hashCode => Object.hash(x, y);