talx x1.0.5

talx.games
Interface GameHandler

All Known Implementing Classes:
HelpDeskHandler, SurveyHandler, TechHandler

public interface GameHandler

Handles moves generated by local and remote players.

See Also:
Game Service Provider Interface Documentation

Method Summary
 java.lang.String handleLocalAction(java.awt.event.ActionEvent ev)
          Handles a game state change initiated by the local player.
 java.lang.String handleRemoteAction(GameChangeProposedEvent ev)
          Handles a game state change initiated by a remote player.
 java.lang.String handleStartGame(Game g)
          Handles a start game action.
 GameState initialize(Game g, Player p)
          Produces a GameState object that is suitable for beginning play.
 

Method Detail

handleLocalAction

public java.lang.String handleLocalAction(java.awt.event.ActionEvent ev)
Handles a game state change initiated by the local player.

Returns:
the text to place on the start game button in the inbox.

handleRemoteAction

public java.lang.String handleRemoteAction(GameChangeProposedEvent ev)
Handles a game state change initiated by a remote player.

Returns:
the text to place on the start game button in the inbox.

handleStartGame

public java.lang.String handleStartGame(Game g)
Handles a start game action. Depending on the game state, the handler may choose to start a new game, or ignore this action.

Returns:
the text to place on the start game button in the inbox.

initialize

public GameState initialize(Game g,
                            Player p)
Produces a GameState object that is suitable for beginning play. Since GameHandlers are stateless, any configuration data should be obtained from the given Game object.

Returns:
the text to place on the start game button in the inbox.

talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.