isBefore method

bool isBefore(
  1. Position another
)

Implementation

bool isBefore(Position another) {
  return another.y > y || (another.y == y && another.x > x);
}