games.strategy.triplea.delegate
Class BidPurchaseDelegate

java.lang.Object
  extended by games.strategy.triplea.delegate.PurchaseDelegate
      extended by games.strategy.triplea.delegate.BidPurchaseDelegate
All Implemented Interfaces:
IDelegate, IRemote, IPurchaseDelegate

public class BidPurchaseDelegate
extends PurchaseDelegate

Title:

Description:

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
unascribed

Constructor Summary
BidPurchaseDelegate()
           
 
Method Summary
protected  boolean canAfford(IntegerMap<Resource> costs, PlayerID player)
          subclasses can over ride this method to use different restrictions as to what a player can buy
static boolean doesPlayerHaveBid(GameData data, PlayerID player)
           
 void end()
          Called before the delegate will stop running.
 void loadState(java.io.Serializable state)
          Loads the delegates state
protected  java.lang.String removeFromPlayer(PlayerID player, IntegerMap<Resource> resources, CompositeChange change, java.util.Collection<Unit> units)
           
 java.io.Serializable saveState()
          Returns the state of the Delegate.
 void start(IDelegateBridge bridge, GameData data)
          Called before the delegate will run.
 
Methods inherited from class games.strategy.triplea.delegate.PurchaseDelegate
getData, getDisplayName, getName, getRemoteType, initialize, purchase, purchaseRepair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BidPurchaseDelegate

public BidPurchaseDelegate()
Method Detail

doesPlayerHaveBid

public static boolean doesPlayerHaveBid(GameData data,
                                        PlayerID player)

canAfford

protected boolean canAfford(IntegerMap<Resource> costs,
                            PlayerID player)
subclasses can over ride this method to use different restrictions as to what a player can buy

Overrides:
canAfford in class PurchaseDelegate

start

public void start(IDelegateBridge bridge,
                  GameData data)
Description copied from class: PurchaseDelegate
Called before the delegate will run.

Specified by:
start in interface IDelegate
Overrides:
start in class PurchaseDelegate

removeFromPlayer

protected java.lang.String removeFromPlayer(PlayerID player,
                                            IntegerMap<Resource> resources,
                                            CompositeChange change,
                                            java.util.Collection<Unit> units)
Overrides:
removeFromPlayer in class PurchaseDelegate

end

public void end()
Called before the delegate will stop running.

Specified by:
end in interface IDelegate
Overrides:
end in class PurchaseDelegate

saveState

public java.io.Serializable saveState()
Returns the state of the Delegate.

Specified by:
saveState in interface IDelegate
Overrides:
saveState in class PurchaseDelegate

loadState

public void loadState(java.io.Serializable state)
Loads the delegates state

Specified by:
loadState in interface IDelegate
Overrides:
loadState in class PurchaseDelegate