net.sourceforge.simplegamenet.framework.model
Class ClientEngineImpl

java.lang.Object
  extended bynet.sourceforge.simplegamenet.framework.model.EngineImpl
      extended bynet.sourceforge.simplegamenet.framework.model.ClientEngineImpl
All Implemented Interfaces:
net.sourceforge.simplegamenet.specs.model.ClientEngine, net.sourceforge.simplegamenet.specs.model.Engine

public class ClientEngineImpl
extends EngineImpl
implements net.sourceforge.simplegamenet.specs.model.ClientEngine


Field Summary
 
Fields inherited from class net.sourceforge.simplegamenet.framework.model.EngineImpl
GAME_ABORTING, GAME_NOT_PLAYING, GAME_PLAYING, GAME_STARTING, GAME_STOPPING, gameFactory, gameSettings, gameState, playerSettingsMap
 
Constructor Summary
ClientEngineImpl(ClientGUIFacade clientGUIFacade, ClientConnectionData clientConnectionData)
           
 
Method Summary
 void abortGame()
           
 void addPlayer(net.sourceforge.simplegamenet.specs.to.PlayerSettings playerSettings)
           
 void changeGameSettings(net.sourceforge.simplegamenet.specs.to.GameSettings changedGameSettings)
           
 void changePlayerSettings(net.sourceforge.simplegamenet.specs.to.PlayerSettings changedPlayerSettings)
           
 void gameAborting()
           
 void gameEnded()
           
 void gameStarted()
           
 void gameStopping()
           
 net.sourceforge.simplegamenet.specs.model.GamePlayerClient getGamePlayerClient()
           
 Integer getPlayerID()
           
 net.sourceforge.simplegamenet.specs.to.PlayerSettings getPlayerSettings()
           
 void joinedGameQuit(int removePlayerType)
           
 void leaveProtocolViolatingServer()
           
 void leaveServer()
           
 void receiveChatMessage(ChatMessage chatMessage)
           
 void receiveData(Serializable data)
           
 void removePlayer(Integer playerID, int removePlayerType)
           
 void sendChatMessage(int type, String message)
           
 void sendData(Serializable data)
           
 void startGame()
           
 void updateGameSettings(net.sourceforge.simplegamenet.specs.to.GameSettings updatedGameSettings)
           
 void updatePlayerSettings(net.sourceforge.simplegamenet.specs.to.PlayerSettings updatedPlayerSettings)
           
 
Methods inherited from class net.sourceforge.simplegamenet.framework.model.EngineImpl
getGameFactory, getGameSettings, getPlayerSettingsMap, isGamePlaying
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.simplegamenet.specs.model.Engine
getGameFactory, getGameSettings, getPlayerSettingsMap, isGamePlaying
 

Constructor Detail

ClientEngineImpl

public ClientEngineImpl(ClientGUIFacade clientGUIFacade,
                        ClientConnectionData clientConnectionData)
Method Detail

receiveChatMessage

public void receiveChatMessage(ChatMessage chatMessage)

sendChatMessage

public void sendChatMessage(int type,
                            String message)
                     throws IllegalStateException
Throws:
IllegalStateException

changeGameSettings

public void changeGameSettings(net.sourceforge.simplegamenet.specs.to.GameSettings changedGameSettings)
                        throws IllegalStateException,
                               IllegalArgumentException
Throws:
IllegalStateException
IllegalArgumentException

updateGameSettings

public void updateGameSettings(net.sourceforge.simplegamenet.specs.to.GameSettings updatedGameSettings)

addPlayer

public void addPlayer(net.sourceforge.simplegamenet.specs.to.PlayerSettings playerSettings)

changePlayerSettings

public void changePlayerSettings(net.sourceforge.simplegamenet.specs.to.PlayerSettings changedPlayerSettings)
                          throws IllegalStateException,
                                 IllegalArgumentException
Throws:
IllegalStateException
IllegalArgumentException

updatePlayerSettings

public void updatePlayerSettings(net.sourceforge.simplegamenet.specs.to.PlayerSettings updatedPlayerSettings)

removePlayer

public void removePlayer(Integer playerID,
                         int removePlayerType)

startGame

public void startGame()
               throws IllegalStateException
Throws:
IllegalStateException

gameStarted

public void gameStarted()

receiveData

public void receiveData(Serializable data)

sendData

public void sendData(Serializable data)
Specified by:
sendData in interface net.sourceforge.simplegamenet.specs.model.ClientEngine

abortGame

public void abortGame()
               throws IllegalStateException
Throws:
IllegalStateException

gameStopping

public void gameStopping()

gameAborting

public void gameAborting()

gameEnded

public void gameEnded()

leaveServer

public void leaveServer()

leaveProtocolViolatingServer

public void leaveProtocolViolatingServer()
Specified by:
leaveProtocolViolatingServer in interface net.sourceforge.simplegamenet.specs.model.ClientEngine

joinedGameQuit

public void joinedGameQuit(int removePlayerType)

getGamePlayerClient

public net.sourceforge.simplegamenet.specs.model.GamePlayerClient getGamePlayerClient()

getPlayerID

public Integer getPlayerID()
Specified by:
getPlayerID in interface net.sourceforge.simplegamenet.specs.model.ClientEngine

getPlayerSettings

public net.sourceforge.simplegamenet.specs.to.PlayerSettings getPlayerSettings()
Specified by:
getPlayerSettings in interface net.sourceforge.simplegamenet.specs.model.ClientEngine


Copyright © 2003-2004 The 3 Belgians. All Rights Reserved.