matches method

bool matches(
  1. UnitType other
)

Implementation

bool matches(UnitType other) {
  final check = children.contains(other);
  return this == other || check;
}