|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.game.SOCGame.RollResult
public static class SOCGame.RollResult
Dice roll result, for reporting from SOCGame.rollDice()
.
Each game has 1 instance of this object, which is updated each turn.
Field Summary | |
---|---|
int[] |
cloth
Null, or distributed cloth (for game scenario SC_CLVI), in the same format as SOCVillage.distributeCloth(SOCGame) . |
int |
diceA
The dice numbers rolled, each 1 to 6. |
int |
diceB
The dice numbers rolled, each 1 to 6. |
SOCResourceSet |
sc_piri_fleetAttackRsrcs
When the pirate fleet moves in game scenario SOCGameOption.K_SC_PIRI ,
resources lost when they attack the player with an adjacent settlement or city
(sc_piri_fleetAttackVictim ). |
SOCPlayer |
sc_piri_fleetAttackVictim
When the pirate fleet moves in game scenario SOCGameOption.K_SC_PIRI ,
they may attack the player with an adjacent settlement or city. |
java.util.Vector<SOCPlayer> |
sc_robPossibleVictims
Robber/pirate fleet victims in some scenarios, otherwise null. |
Constructor Summary | |
---|---|
SOCGame.RollResult()
|
Method Summary | |
---|---|
void |
update(int dA,
int dB)
Convenience: Set diceA and dice, clear cloth . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int diceA
public int diceB
public int[] cloth
SOCVillage.distributeCloth(SOCGame)
.
public java.util.Vector<SOCPlayer> sc_robPossibleVictims
When a 7 is rolled in game scenario SOCGameOption.K_SC_PIRI
,
there is no robber piece to move; the current player immediately picks another
player with resources to steal from. In that situation, this field holds
the list of possible victims, and gameState is SOCGame.WAITING_FOR_ROB_CHOOSE_PLAYER
.
Moving the pirate fleet might also have a different victim,
see sc_piri_fleetAttackVictim
and sc_piri_fleetAttackRsrcs
.
SOCGame.getPossibleVictims()
public SOCPlayer sc_piri_fleetAttackVictim
SOCGameOption.K_SC_PIRI
,
they may attack the player with an adjacent settlement or city.
If no adjacent, or more than 1, nothing happens, and this field is null.
Otherwise see sc_piri_fleetAttackRsrcs
for the result.
Each time the dice is rolled, the fleet is moved and this field is updated; may be null.
public SOCResourceSet sc_piri_fleetAttackRsrcs
SOCGameOption.K_SC_PIRI
,
resources lost when they attack the player with an adjacent settlement or city
(sc_piri_fleetAttackVictim
).
Each time the dice is rolled, the fleet is moved and this field is updated; may be null.
If the victim wins against the attack, they gain a resource of their choice, but that chosen resource would be in a different game state, not part of the RollResult.
Constructor Detail |
---|
public SOCGame.RollResult()
Method Detail |
---|
public void update(int dA, int dB)
cloth
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |