|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.Round
rails.game.StockRound
rails.game.specific._1835.StockRound_1835
public class StockRound_1835
Field Summary |
---|
Fields inherited from class rails.game.StockRound |
---|
BOUGHT, companyBoughtThisTurnWrapper, currentPlayer, hasActed, hasSoldThisTurnBeforeBuying, numberOfPlayers, numPasses, playersThatSoldThisRound, SELL_BUY, SELL_BUY_OR_BUY_SELL, SELL_BUY_SELL, sellObligationLifted, sellPrices, sequenceRule, SOLD, startingPlayer |
Fields inherited from class rails.game.Round |
---|
autopasses, bank, canRequestTurn, companyManager, gameManager, guiHints, hasRequestedTurn, ipo, log, mapManager, moveStack, playerManager, pool, possibleActions, scrapHeap, stockMarket, unavailable, wasInterrupted |
Constructor Summary | |
---|---|
StockRound_1835(GameManagerI aGameManager)
Constructor with the GameManager, will call super class (StockRound's) Constructor to initialize |
Method Summary | |
---|---|
protected void |
adjustSharePrice(PublicCompanyI company,
int numberSold,
boolean soldBefore)
Share price goes down 1 space for any number of shares sold. |
boolean |
checkAgainstHoldLimit(Player player,
PublicCompanyI company,
int number)
Check if a player may buy the given number of shares from a given company, given the "hold limit" per company, that is the percentage of shares of one company that a player may hold (typically 60%). |
protected void |
gameSpecificChecks(Portfolio boughtFrom,
PublicCompanyI company)
The company release rules for 1835. |
protected int |
getBuyPrice(BuyCertificate action,
StockSpaceI currentSpace)
Allow different price setting in subclasses (i.e. |
protected int |
getCurrentSellPrice(PublicCompanyI company)
|
protected void |
setGameSpecificActions()
Add nationalisations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StockRound_1835(GameManagerI aGameManager)
aGameManager
- The GameManager Object needed to initialize the Stock RoundMethod Detail |
---|
protected void setGameSpecificActions()
setGameSpecificActions
in class StockRound
public boolean checkAgainstHoldLimit(Player player, PublicCompanyI company, int number)
StockRound
checkAgainstHoldLimit
in class StockRound
player
- the buying playercompany
- The company from which to buynumber
- The number of shares (usually 1 but not always so)
protected int getBuyPrice(BuyCertificate action, StockSpaceI currentSpace)
StockRound
getBuyPrice
in class StockRound
protected int getCurrentSellPrice(PublicCompanyI company)
getCurrentSellPrice
in class StockRound
protected void adjustSharePrice(PublicCompanyI company, int numberSold, boolean soldBefore)
adjustSharePrice
in class StockRound
protected void gameSpecificChecks(Portfolio boughtFrom, PublicCompanyI company)
gameSpecificChecks
in class StockRound
boughtfrom
- The portfolio from which a certificate has been bought.company
- The company of which a share has been traded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |