de.java_chess.javaChess
Class GameController

java.lang.Object
  |
  +--de.java_chess.javaChess.GameController

public class GameController
extends java.lang.Object

This class controls the game.


Constructor Summary
GameController(Game game, GameNotation gameNotation, ChessEngine engine, Board board)
          Create a new controller instance.
 
Method Summary
 boolean computerPly()
          Let the computer make a move.
 Game getGame()
          Get the current game.
 GameNotation getGameNotation()
          Get the current game notation.
 void setGame(Game game)
          Set the current game.
 void setGameNotation(GameNotation gameNotation)
          Set the current game notation.
 void signalUserInputError(java.lang.String errorMessage)
          Signal a input error to the user.
 void toggleMoveRight()
          Turn the right to move from one player to the other.
 void userPly(Ply ply)
          The user moved a piece.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameController

public GameController(Game game,
                      GameNotation gameNotation,
                      ChessEngine engine,
                      Board board)
Create a new controller instance.
Method Detail

getGame

public final Game getGame()
Get the current game.
Returns:
The current game.

setGame

public final void setGame(Game game)
Set the current game.
Parameters:
The - current game.

getGameNotation

public final GameNotation getGameNotation()
Get the current game notation.
Returns:
The current game notation.

setGameNotation

public final void setGameNotation(GameNotation gameNotation)
Set the current game notation.
Parameters:
gameNotation - The new game notation.

computerPly

public final boolean computerPly()
Let the computer make a move.

userPly

public final void userPly(Ply ply)
The user moved a piece.
Parameters:
ply - The ply of the user.

toggleMoveRight

public void toggleMoveRight()
Turn the right to move from one player to the other.

signalUserInputError

public final void signalUserInputError(java.lang.String errorMessage)
Signal a input error to the user.
Parameters:
errorMessage - More information on the error.