Class FormationType.CountConstraint

java.lang.Object
megamek.client.ratgenerator.FormationType.Constraint
megamek.client.ratgenerator.FormationType.CountConstraint
Enclosing class:
FormationType

public static class FormationType.CountConstraint extends FormationType.Constraint
A FormationType.Constraint requiring a fixed minimum number of units to satisfy the criterion, regardless of formation size. Used for rules like "at least 3 units must be Heavy or larger".
  • Constructor Details

    • CountConstraint

      public CountConstraint(int min, Predicate<MekSummary> criterion, String description)
      Parameters:
      min - the minimum count of matching units
      criterion - predicate identifying units that satisfy this constraint
      description - human-readable rule description
  • Method Details