Package net.sf.colossus.server
Class PenaltyOption
java.lang.Object
net.sf.colossus.server.PenaltyOption
- All Implemented Interfaces:
Comparable<PenaltyOption>
Holds the information for one possible strike penalty, including
the null no-penalty option.
- Author:
- David Ripton
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPenaltyOption
(Game game, Creature striker, Creature target, int dice, int strikeNumber) -
Method Summary
Modifier and TypeMethodDescription(package private) void
addCarryTarget
(BattleHex carryTarget) (package private) void
addCarryTargets
(Set<BattleHex> targets) int
compareTo
(PenaltyOption other) Sort first by ascending dice, then by descending strike number, then by striker and target.boolean
Do not consider carryTargets.(package private) int
getDice()
(package private) int
(package private) Creature
(package private) Creature
int
hashCode()
Do not consider carryTargets.(package private) int
toString()
-
Field Details
-
LOGGER
-
game
-
striker
-
target
-
carryTargets
-
dice
private final int dice -
strikeNumber
private final int strikeNumber
-
-
Constructor Details
-
PenaltyOption
-
-
Method Details
-
getStriker
Creature getStriker() -
getTarget
Creature getTarget() -
getDice
int getDice() -
getStrikeNumber
int getStrikeNumber() -
addCarryTarget
-
addCarryTargets
-
getCarryTargets
-
numCarryTargets
int numCarryTargets() -
compareTo
Sort first by ascending dice, then by descending strike number, then by striker and target. Do not consider carryTargets.- Specified by:
compareTo
in interfaceComparable<PenaltyOption>
-
equals
Do not consider carryTargets. -
hashCode
public int hashCode()Do not consider carryTargets. -
toString
-