Class CustomRecruitBase

  • All Implemented Interfaces:
    ICustomRecruitBase

    public abstract class CustomRecruitBase
    extends java.lang.Object
    implements ICustomRecruitBase
    Base class to implement custom recruiting functions (i.e. anything that is not a-number-of-creature to another creature)
    Author:
    Romain Dolbeau
    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • allPlayers

        protected static final java.util.List<Player> allPlayers
      • allCaretakerInfo

        private static final java.util.List<Caretaker> allCaretakerInfo
      • allCustomRecruitBase

        private static final java.util.List<CustomRecruitBase> allCustomRecruitBase
    • Constructor Detail

      • CustomRecruitBase

        public CustomRecruitBase()
    • Method Detail

      • reset

        public static final void reset()
      • resetAllInstances

        public static final void resetAllInstances()
      • initCustomVariant

        protected void initCustomVariant()
      • initCustomVariantForAllCRBs

        public static final void initCustomVariantForAllCRBs()
      • everyoneAdvanceTurn

        public static final void everyoneAdvanceTurn​(int newActivePlayer)
      • addPlayerClientSide

        public static final void addPlayerClientSide​(Player pi)
      • addCaretakerClientSide

        public static final void addCaretakerClientSide​(Caretaker ci)
      • setCount

        protected final void setCount​(CreatureType type,
                                      int newCount,
                                      boolean reset)
      • adjustAvailableCount

        protected final void adjustAvailableCount​(CreatureType type)
      • getCount

        protected final int getCount​(CreatureType type)
      • getDeadCount

        protected final int getDeadCount​(CreatureType type)
      • getPossibleSpecialRecruiters

        public abstract java.util.List<CreatureType> getPossibleSpecialRecruiters​(MasterHex hex)
        List creatures that can recruit in this terrain in a special way now.
        Specified by:
        getPossibleSpecialRecruiters in interface ICustomRecruitBase
        Parameters:
        hex - The specific MasterHex considered for recruiting.
        Returns:
        A List of possible special Recruiters in this hex.
      • getPossibleSpecialRecruits

        public abstract java.util.List<CreatureType> getPossibleSpecialRecruits​(MasterHex hex)
        List creatures that can be recruited in this terrain in a special way now.
        Specified by:
        getPossibleSpecialRecruits in interface ICustomRecruitBase
        Parameters:
        hex - The specific MasterHex considered for recruiting (for an example, see getPossibleSpecialRecruits() in BalrogRecruitment.java in Balrog variant directory)
        Returns:
        A List of possible special Recruits in this hex.
      • changeOfTurn

        protected abstract void changeOfTurn​(int newActivePlayer)
        Bookkeeping function, called once after every player turn. Protected as it should only be called from everyoneAdvanceTurn().
      • resetInstance

        protected abstract void resetInstance()
        Reset, called at the beginning of a game.