Class LegionClientSide
java.lang.Object
net.sf.colossus.game.Legion
net.sf.colossus.client.LegionClientSide
- All Implemented Interfaces:
IOracleLegion
Client-side version of a legion.
- Author:
- David Ripton
-
Nested Class Summary
Nested classes/interfaces inherited from class Legion
Legion.AcquirableDecision -
Field Summary
FieldsFields inherited from class Legion
angelsToAcquire, decisions, ORDER_TITAN_THEN_POINTS, ORDER_TITAN_THEN_POINTS_THEN_MARKER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCreature(CreatureType creature) Add a new creature to this legion.booleanA less typesafe version ofLegion.contains(CreatureType).intReturn the total point value of those creatures of this legion which are certain.Return a list of Booleans.Return an immutable copy of the legion's contents, in sorted order.We don't use the creature list in this class yet, so we override this to use the one from thePredictSplitNode.intReturns the number of creatures in this legion.Return a list of Strings.private PredictSplitNodegetNode()private PredictSplitNodeRetrieves the player this legion belongs to.intReturn the point value of suspected contents of this legion.(package private) voidintnumCreature(String creatureName) TODO get rid of string-based versionintvoidremoveCreature(CreatureType creature) (package private) voidrevealCreatures(List<CreatureType> creatures) Reveal creatures in this legion, some of which already may be known.(package private) voidMethods inherited from class Legion
canFlee, contains, equals, findEligibleAngels, getCreatureTypes, getCurrentHex, getEntrySide, getLongMarkerId, getMarkerId, getRecruit, getSkipThisTime, getTitan, getVisitedThisPhase, hashCode, hasMoved, hasRecruited, hasSummonable, hasTeleported, hasTitan, numCreature, numLords, numRangestrikers, setCurrentHex, setEntrySide, setMoved, setRecruit, setSkipThisTime, setTeleported, setupAcquirableDecisions, setVisitedThisPhase, toStringMethods inherited from interface IOracleLegion
contains, numCreature
-
Field Details
-
LOGGER
-
myNode
-
-
Constructor Details
-
LegionClientSide
-
-
Method Details
-
getNode
-
getNode
-
getHeight
public int getHeight()Description copied from class:LegionReturns the number of creatures in this legion.- Specified by:
getHeightin interfaceIOracleLegion- Overrides:
getHeightin classLegion- Returns:
- the number of creatures in the legion
-
getCreatures
We don't use the creature list in this class yet, so we override this to use the one from thePredictSplitNode. TODO fix this, particularly the use of creature names in here. Note that the current version also has the issue that every time this method is called a new list with new creatures is created, which will break identity checks.- Overrides:
getCreaturesin classLegion
-
getContents
-
contains
A less typesafe version ofLegion.contains(CreatureType). TODO deprecate and remove- Specified by:
containsin interfaceIOracleLegion
-
numCreature
TODO get rid of string-based version- Specified by:
numCreaturein interfaceIOracleLegion
-
getImageNames
-
getCertainties
-
getPlayer
Description copied from class:LegionRetrieves the player this legion belongs to. -
addCreature
Add a new creature to this legion.- Specified by:
addCreaturein classLegion
-
removeCreature
- Specified by:
removeCreaturein classLegion
-
revealCreatures
Reveal creatures in this legion, some of which already may be known. -
split
-
merge
-
getPointValue
public int getPointValue()Return the point value of suspected contents of this legion.- Specified by:
getPointValuein classLegion
-
getCertainPointValue
public int getCertainPointValue()Return the total point value of those creatures of this legion which are certain. -
numUncertainCreatures
public int numUncertainCreatures()
-