Class UniversalEggGroup

All Implemented Interfaces:
EggGroup, ITranslatable

public class UniversalEggGroup extends BasicEggGroup
An extension of the BasicEggGroup that accepts all other egg groups as a partner except the UndiscoveredEggGroup
Since:
24/06/2022
  • Constructor Details

    • UniversalEggGroup

      public UniversalEggGroup(int index, String name)
      Basic constructor taking the index and the name
      Parameters:
      index - The index of the egg group
      name - The name of the egg group
    • UniversalEggGroup

      public UniversalEggGroup()
  • Method Details

    • canBreed

      public boolean canBreed(Gender first, Gender second)
      Description copied from interface: EggGroup
      Checks if the two Gender
      Specified by:
      canBreed in interface EggGroup
      Overrides:
      canBreed in class AbstractEggGroup
      Parameters:
      first - The first gender
      second - The second gender
      Returns:
      True if they can breed
    • canBreedWith

      public boolean canBreedWith(EggGroup other)
      Description copied from interface: EggGroup
      Checks if the other egg group can breed with this egg group Make sure it is consistent in both directions (i.e. if it returns true in this one, it should return true in the other one)
      Specified by:
      canBreedWith in interface EggGroup
      Overrides:
      canBreedWith in class BasicEggGroup
      Parameters:
      other - The other egg group to check
      Returns:
      True if they can breed together, false if not