games.strategy.kingstable.delegate
Class PlayDelegate

java.lang.Object
  extended by games.strategy.common.delegate.BaseDelegate
      extended by games.strategy.kingstable.delegate.PlayDelegate
All Implemented Interfaces:
IDelegate, IRemote, IPlayDelegate

public class PlayDelegate
extends BaseDelegate
implements IPlayDelegate

Responsible for performing a move in a game of King's Table.

Version:
$LastChangedDate: 2007-07-03 09:32:59 -0700 (Tue, 03 Jul 2007) $
Author:
Lane Schwartz

Field Summary
 
Fields inherited from class games.strategy.common.delegate.BaseDelegate
m_bridge, m_data, m_displayName, m_name, m_player
 
Constructor Summary
PlayDelegate()
           
 
Method Summary
 java.lang.Class<? extends IRemote> getRemoteType()
          If this class implements an interface which inherits from IRemote, returns the class of that interface.
 java.lang.String play(Territory start, Territory end)
          Attempt to move a piece from the start Territory to the end Territory.
 void start(IDelegateBridge bridge, GameData gameData)
          Called before the delegate will run.
 
Methods inherited from class games.strategy.common.delegate.BaseDelegate
end, getDisplayName, getName, initialize, loadState, saveState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayDelegate

public PlayDelegate()
Method Detail

start

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

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

play

public java.lang.String play(Territory start,
                             Territory end)
Attempt to move a piece from the start Territory to the end Territory.

Specified by:
play in interface IPlayDelegate
Parameters:
start - Territory where the move should start
end - Territory where the move should end

getRemoteType

public java.lang.Class<? extends IRemote> getRemoteType()
If this class implements an interface which inherits from IRemote, returns the class of that interface. Otherwise, returns null.

Specified by:
getRemoteType in interface IDelegate
Specified by:
getRemoteType in class BaseDelegate