games.strategy.kingstable
Class KingsTable

java.lang.Object
  extended by games.strategy.kingstable.KingsTable
All Implemented Interfaces:
IGameLoader, java.io.Serializable

public class KingsTable
extends java.lang.Object
implements IGameLoader

Main class responsible for a Kings Table game.

Version:
$LastChangedDate: 2007-12-14 06:51:35 -0800 (Fri, 14 Dec 2007) $
Author:
Lane Schwartz
See Also:
Serialized Form

Field Summary
static boolean centerSquareCanBeUsedToCapturePawns
           
static boolean centerSquareCanBeUsedToCaptureTheKing
           
static boolean cornerSquaresCanBeUsedToCapturePawns
           
static boolean cornerSquaresCanBeUsedToCaptureTheKing
           
static boolean edgeOfBoardCanBeUsedToCaptureTheKing
           
static boolean kingCanBeCapturedLikeAPawn
           
static boolean kingCanParticipateInCaptures
           
 
Fields inherited from interface games.strategy.engine.framework.IGameLoader
CLIENT_PLAYER_TYPE
 
Constructor Summary
KingsTable()
           
 
Method Summary
 java.util.Set<IGamePlayer> createPlayers(java.util.Map playerNames)
          Create the players.
 java.lang.Class<? extends IChannelSubscribor> getDisplayType()
          Get the type of the display
 IPBEMMessenger[] getPBEMMessengers()
          Get PBEM messengers for Turn Summary notification
 java.lang.Class<? extends IRemote> getRemotePlayerType()
          Get the type of the GamePlayer.
 java.lang.String[] getServerPlayerTypes()
          Return an array of player types that can play on the server.
 IUnitFactory getUnitFactory()
          A game may use a subclass of Unit to allow associating data with a particular unit.
 void shutDown()
           
 void startGame(IGame game, java.util.Set<IGamePlayer> players)
          The game is about to start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kingCanParticipateInCaptures

public static boolean kingCanParticipateInCaptures

cornerSquaresCanBeUsedToCapturePawns

public static boolean cornerSquaresCanBeUsedToCapturePawns

centerSquareCanBeUsedToCapturePawns

public static boolean centerSquareCanBeUsedToCapturePawns

cornerSquaresCanBeUsedToCaptureTheKing

public static boolean cornerSquaresCanBeUsedToCaptureTheKing

centerSquareCanBeUsedToCaptureTheKing

public static boolean centerSquareCanBeUsedToCaptureTheKing

edgeOfBoardCanBeUsedToCaptureTheKing

public static boolean edgeOfBoardCanBeUsedToCaptureTheKing

kingCanBeCapturedLikeAPawn

public static boolean kingCanBeCapturedLikeAPawn
Constructor Detail

KingsTable

public KingsTable()
Method Detail

createPlayers

public java.util.Set<IGamePlayer> createPlayers(java.util.Map playerNames)
Description copied from interface: IGameLoader
Create the players. Given a map of playerName -> type, where type is one of the Strings returned by a getServerPlayerTypes() or IGameLoader.CLIENT_PLAYER_TYPE.

Specified by:
createPlayers in interface IGameLoader
Returns:
a Set of GamePlayers
See Also:
IGameLoader.createPlayers(playerNames)

getServerPlayerTypes

public java.lang.String[] getServerPlayerTypes()
Return an array of player types that can play on the server.

Specified by:
getServerPlayerTypes in interface IGameLoader

shutDown

public void shutDown()
Specified by:
shutDown in interface IGameLoader

startGame

public void startGame(IGame game,
                      java.util.Set<IGamePlayer> players)
               throws java.lang.Exception
Description copied from interface: IGameLoader
The game is about to start.

Specified by:
startGame in interface IGameLoader
Throws:
java.lang.Exception

getPBEMMessengers

public IPBEMMessenger[] getPBEMMessengers()
Description copied from interface: IGameLoader
Get PBEM messengers for Turn Summary notification

Specified by:
getPBEMMessengers in interface IGameLoader

getDisplayType

public java.lang.Class<? extends IChannelSubscribor> getDisplayType()
Description copied from interface: IGameLoader
Get the type of the display

Specified by:
getDisplayType in interface IGameLoader
Returns:
an interface that extends IChannelSubscrobor
See Also:
IGameLoader.getDisplayType()

getRemotePlayerType

public java.lang.Class<? extends IRemote> getRemotePlayerType()
Description copied from interface: IGameLoader
Get the type of the GamePlayer.

The type must extend IRemote, and is to be used by an IRemoteManager to allow a player to be contacted remotately

Specified by:
getRemotePlayerType in interface IGameLoader
See Also:
IRemoteMessenger

getUnitFactory

public IUnitFactory getUnitFactory()
Description copied from interface: IGameLoader
A game may use a subclass of Unit to allow associating data with a particular unit. The game does this by specifying a IUnitFactory that should be used to create units.

Games that do not want to subclasses of units should simply return a DefaultUnitFactory.

Specified by:
getUnitFactory in interface IGameLoader