games.strategy.triplea.delegate
Class AbstractEndTurnDelegate

java.lang.Object
  extended by games.strategy.triplea.delegate.AbstractEndTurnDelegate
All Implemented Interfaces:
IDelegate, IRemote, IAbstractEndTurnDelegate
Direct Known Subclasses:
EndTurnDelegate, EndTurnDelegate

public abstract class AbstractEndTurnDelegate
extends java.lang.Object
implements IDelegate, IAbstractEndTurnDelegate

Version:
1.0 At the end of the turn collect income.
Author:
Sean Bridges

Field Summary
protected  GameData m_data
           
protected  boolean m_gameOver
           
 
Constructor Summary
AbstractEndTurnDelegate()
           
 
Method Summary
protected abstract  void checkForWinner(IDelegateBridge bridge)
           
 void end()
          Called before the delegate will stop running.
 java.lang.String getDisplayName()
           
 boolean getHasPostedTurnSummary()
           
 java.lang.String getName()
           
protected  int getProduction(java.util.Collection<Territory> territories)
           
 java.lang.Class<? extends IRemote> getRemoteType()
          Get the remote type of this delegate for use by a RemoteMessenger.
 void initialize(java.lang.String name, java.lang.String displayName)
           
 void loadState(java.io.Serializable aState)
          Loads the delegates state
 boolean postTurnSummary(PBEMMessagePoster poster)
           
 java.io.Serializable saveState()
          Returns the state of the Delegate.
 void setHasPostedTurnSummary(boolean hasPostedTurnSummary)
           
 void start(IDelegateBridge aBridge, GameData gameData)
          Called before the delegate will run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_data

protected GameData m_data

m_gameOver

protected boolean m_gameOver
Constructor Detail

AbstractEndTurnDelegate

public AbstractEndTurnDelegate()
Method Detail

initialize

public void initialize(java.lang.String name,
                       java.lang.String displayName)
Specified by:
initialize in interface IDelegate

start

public void start(IDelegateBridge aBridge,
                  GameData gameData)
Called before the delegate will run.

Specified by:
start in interface IDelegate

checkForWinner

protected abstract void checkForWinner(IDelegateBridge bridge)

getProduction

protected int getProduction(java.util.Collection<Territory> territories)

setHasPostedTurnSummary

public void setHasPostedTurnSummary(boolean hasPostedTurnSummary)
Specified by:
setHasPostedTurnSummary in interface IAbstractEndTurnDelegate

getHasPostedTurnSummary

public boolean getHasPostedTurnSummary()
Specified by:
getHasPostedTurnSummary in interface IAbstractEndTurnDelegate

postTurnSummary

public boolean postTurnSummary(PBEMMessagePoster poster)
Specified by:
postTurnSummary in interface IAbstractEndTurnDelegate

getName

public java.lang.String getName()
Specified by:
getName in interface IDelegate

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface IDelegate

end

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

Specified by:
end in interface IDelegate

getRemoteType

public java.lang.Class<? extends IRemote> getRemoteType()
Description copied from interface: IDelegate
Get the remote type of this delegate for use by a RemoteMessenger. Class must be an interface that extends IRemote If the return value is null, then it indicates that this delegate should not be used as in IRemote.

Specified by:
getRemoteType in interface IDelegate

saveState

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

Specified by:
saveState in interface IDelegate

loadState

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

Specified by:
loadState in interface IDelegate