Package net.sf.colossus.server
Class CustomRecruitBase
java.lang.Object
net.sf.colossus.server.CustomRecruitBase
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final List
<CustomRecruitBase> private static final Logger
private static GameServerSide
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final void
static final void
protected final void
protected abstract void
changeOfTurn
(int newActivePlayer) Bookkeeping function, called once after every player turn.static final void
everyoneAdvanceTurn
(int newActivePlayer) abstract List
<CreatureType> List all creatures that can recruit in this terrain in a special way.abstract List
<CreatureType> List all creatures that can be recruited in this terrain in a special way.protected final int
getCount
(CreatureType type) protected final int
getDeadCount
(CreatureType type) abstract List
<CreatureType> List creatures that can recruit in this terrain in a special way now.abstract List
<CreatureType> List creatures that can be recruited in this terrain in a special way now.protected void
static final void
abstract int
numberOfRecruiterNeeded
(CreatureType recruiter, CreatureType recruit, MasterHex hex) Number of recruiters needed to get a recruit in a special way in this terrain now.static final void
reset()
static final void
protected abstract void
Reset, called at the beginning of a game.protected final void
setCount
(CreatureType type, int newCount, boolean reset) static final void
-
Field Details
-
LOGGER
-
allPlayers
-
allCaretakerInfo
-
serverGame
-
allCustomRecruitBase
-
-
Constructor Details
-
CustomRecruitBase
public CustomRecruitBase()
-
-
Method Details
-
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
-
addCaretakerClientSide
-
setGame
-
setCount
-
adjustAvailableCount
-
getCount
-
getDeadCount
-
getAllPossibleSpecialRecruiters
List all creatures that can recruit in this terrain in a special way.- Specified by:
getAllPossibleSpecialRecruiters
in interfaceICustomRecruitBase
-
getAllPossibleSpecialRecruits
List all creatures that can be recruited in this terrain in a special way.- Specified by:
getAllPossibleSpecialRecruits
in interfaceICustomRecruitBase
-
getPossibleSpecialRecruiters
List creatures that can recruit in this terrain in a special way now.- Specified by:
getPossibleSpecialRecruiters
in interfaceICustomRecruitBase
- Parameters:
hex
- The specific MasterHex considered for recruiting.- Returns:
- A List of possible special Recruiters in this hex.
-
getPossibleSpecialRecruits
List creatures that can be recruited in this terrain in a special way now.- Specified by:
getPossibleSpecialRecruits
in interfaceICustomRecruitBase
- 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.
-
numberOfRecruiterNeeded
public abstract int numberOfRecruiterNeeded(CreatureType recruiter, CreatureType recruit, MasterHex hex) Number of recruiters needed to get a recruit in a special way in this terrain now.- Specified by:
numberOfRecruiterNeeded
in interfaceICustomRecruitBase
-
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.
-