rails.game.specific._1856
Class StockRound_1856

java.lang.Object
  extended by rails.game.Round
      extended by rails.game.StockRound
          extended by rails.game.specific._1856.StockRound_1856
All Implemented Interfaces:
RoundI

public class StockRound_1856
extends StockRound


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_1856(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)
           
protected  void checkFlotation(PublicCompanyI company)
          Special 1856 code to check for company flotation.
protected  void gameSpecificChecks(Portfolio boughtFrom, PublicCompanyI company)
          Check for the special condition that the CGR president has just bought his second share.
protected  CashHolder getSharePriceRecipient(PublicCompanyI company, Portfolio from, int price)
          Who receives the cash when a certificate is bought.
protected  void initPlayer()
           
 void resume()
          Generic stub to resume an interrupted round.
 boolean setPossibleActions()
          Check if the player is president of CGR and must buy a second share
 
Methods inherited from class rails.game.StockRound
buyShares, checkAgainstHoldLimit, done, executeExchangeForShare, executeShareTransfer, finishRound, finishTurn, getBuyPrice, getCurrentPlayerIndex, getCurrentSellPrice, getHelp, getRoundName, getStockRoundNumber, isPlayerOverLimits, isPlayerOverLimitsDetail, isSaleRecorded, isSellObligationLifted, maxAllowedNumberOfSharesToBuy, mayCurrentPlayerBuyAnything, mayCurrentPlayerSellAnything, mayPlayerBuyCertificate, mayPlayerSellShareOfCompany, noSaleIfNotOperated, noSaleInFirstSR, process, processGameSpecificAction, recordSale, releaseCompanyShares, requestTurn, sellShares, setBuyableCerts, setCurrentPlayer, setGameSpecificActions, setNextPlayer, setPriority, setSellableShares, setSellObligationLifted, setSpecialActions, start, startCompany, toString, useSpecialProperty
 
Methods inherited from class rails.game.Round
canCompanyOperateThisRound, canRequestTurn, certCountsAsSold, exchangeTokens, floatCompany, getAutopasses, getCurrentPhase, getCurrentPlayer, getGameManager, getGameOption, getGameParameter, getGameParameterAsBoolean, getGameParameterAsInt, getNumberOfActivePlayers, getNumberOfPlayers, getPlayers, getRoundTypeForUI, getSoldPercentage, getSpecialProperties, hasAutopassed, pay, pay, requestTurn, setAutopass, setCanRequestTurn, setCurrentPlayerIndex, setOperatingCompanies, setOperatingCompanies, transferCertificate, transferCertificates, wasInterrupted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StockRound_1856

public StockRound_1856(GameManagerI aGameManager)
Constructor with the GameManager, will call super class (StockRound's) Constructor to initialize

Parameters:
aGameManager - The GameManager Object needed to initialize the Stock Round
Method Detail

checkFlotation

protected void checkFlotation(PublicCompanyI company)
Special 1856 code to check for company flotation.

Overrides:
checkFlotation in class Round
Parameters:
company -

initPlayer

protected void initPlayer()
Overrides:
initPlayer in class StockRound

adjustSharePrice

protected void adjustSharePrice(PublicCompanyI company,
                                int numberSold,
                                boolean soldBefore)
Overrides:
adjustSharePrice in class StockRound

getSharePriceRecipient

protected CashHolder getSharePriceRecipient(PublicCompanyI company,
                                            Portfolio from,
                                            int price)
Description copied from class: StockRound
Who receives the cash when a certificate is bought. With incremental capitalization, this can be the company treasure. This method must be called before transferring the certificate.

Overrides:
getSharePriceRecipient in class StockRound
Returns:

gameSpecificChecks

protected void gameSpecificChecks(Portfolio boughtFrom,
                                  PublicCompanyI company)
Check for the special condition that the CGR president has just bought his second share.

Overrides:
gameSpecificChecks in class StockRound

resume

public void resume()
Description copied from class: Round
Generic stub to resume an interrupted round. Only valid if implemented in a subclass.

Specified by:
resume in interface RoundI
Overrides:
resume in class Round

setPossibleActions

public boolean setPossibleActions()
Check if the player is president of CGR and must buy a second share

Specified by:
setPossibleActions in interface RoundI
Overrides:
setPossibleActions in class StockRound