|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.action.PossibleAction
rails.game.correct.CorrectionAction
rails.game.correct.CashCorrectionAction
public class CashCorrectionAction
Correction action that changes the cash position of a cashholder.
Field Summary | |
---|---|
static long |
serialVersionUID
The Constant serialVersionUID. |
Fields inherited from class rails.game.correct.CorrectionAction |
---|
correctionName, correctionType |
Fields inherited from class rails.game.action.PossibleAction |
---|
acted, gameManager, log, playerIndex, playerName |
Constructor Summary | |
---|---|
CashCorrectionAction(Player pl)
Instantiates a new correct cash |
|
CashCorrectionAction(PublicCompanyI pc)
Instantiates a new correct cash |
Method Summary | |
---|---|
boolean |
equalsAsAction(PossibleAction action)
Compare the chosen actions of two action objects. |
boolean |
equalsAsOption(PossibleAction action)
Compare the choice options of two action objects, without regard to whatever choice has been made, if any. |
int |
getAmount()
|
CashHolder |
getCashHolder()
|
java.lang.String |
getCashHolderName()
|
int |
getMaximumNegative()
|
void |
setAmount(int amount)
|
java.lang.String |
toString()
|
Methods inherited from class rails.game.correct.CorrectionAction |
---|
getCorrectionName, getCorrectionType, setCorrectionType |
Methods inherited from class rails.game.action.PossibleAction |
---|
getCompanyManager, getGameManager, getPlayerIndex, getPlayerName, hasActed, setActed, setPlayerName, toMenu |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public CashCorrectionAction(Player pl)
pl
- Playerpublic CashCorrectionAction(PublicCompanyI pc)
pc
- Public CompanyMethod Detail |
---|
public CashHolder getCashHolder()
public java.lang.String getCashHolderName()
public int getMaximumNegative()
public int getAmount()
public void setAmount(int amount)
public boolean equalsAsOption(PossibleAction action)
PossibleAction
This method is used by the server (engine) to validate the incoming action that has actually been chosen in the client (GUI), but only for the purpose to check if the chosen option was really on offer, not to check if the chosen action is actually valid. These perspectives could give different results in cases where the PossibleAction does not fully restrict choices to valid values only (such as the blanket LayTile that does no restrict the hex to lay a tile on, or the SetDividend that will accept any revenue value).
equalsAsOption
in class PossibleAction
action
- Another PossibleAction to compare with.
public boolean equalsAsAction(PossibleAction action)
PossibleAction
This method is used by the server (engine) to check if two action objects represent the same actual action, as is done when reloading a saved file (i.e. loading a later stage of the same game).
equalsAsAction
in class PossibleAction
action
- Another PossibleAction to compare with.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |