de.java_chess.javaChess.notation
Class GameNotationImpl

java.lang.Object
  |
  +--de.java_chess.javaChess.notation.GameNotationImpl

public class GameNotationImpl
extends java.lang.Object
implements GameNotation

This class implements the functionality to notate an entire game.


Constructor Summary
GameNotationImpl()
          Create a new game notation instance.
 
Method Summary
 void addPly(PlyNotation plyNotation)
          Add a new ply with it's notation.
 java.lang.String getMove(int moveIndex, boolean white)
          Get the notation for a given move and piece color.
 NotationPanel getNotationPanel()
          Get the panel for the output.
 java.lang.String getPlayerInfo(boolean white)
          Get some info on a player.
 void setNotationPanel(NotationPanel notationPanel)
          Set the panel for the notation output.
 void setPlayerInfo(java.lang.String playerInfo, boolean white)
          Set the info on a player.
 java.lang.String toString()
          Get the entire game as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameNotationImpl

public GameNotationImpl()
Create a new game notation instance.
Method Detail

getMove

public final java.lang.String getMove(int moveIndex,
                                      boolean white)
Get the notation for a given move and piece color.
Specified by:
getMove in interface GameNotation
Parameters:
moveIndex - The index of the move.
boolean - white Flag to indicate if the color is white.
Returns:
The notation for a given move and color.

addPly

public void addPly(PlyNotation plyNotation)
Add a new ply with it's notation.
Specified by:
addPly in interface GameNotation
Parameters:
plyNotation - The notation of the new ply.

toString

public final java.lang.String toString()
Get the entire game as a string.
Specified by:
toString in interface GameNotation
Overrides:
toString in class java.lang.Object
Returns:
The entire game as a string.

getPlayerInfo

public final java.lang.String getPlayerInfo(boolean white)
Get some info on a player.
Specified by:
getPlayerInfo in interface GameNotation
Returns:
Some info on a player.

setPlayerInfo

public final void setPlayerInfo(java.lang.String playerInfo,
                                boolean white)
Set the info on a player.
Specified by:
setPlayerInfo in interface GameNotation
Parameters:
playerInfo - The player info.
white - Flag to indicate, if it's the player with the white pieces.

getNotationPanel

public final NotationPanel getNotationPanel()
Get the panel for the output.
Returns:
The panel for the output.

setNotationPanel

public final void setNotationPanel(NotationPanel notationPanel)
Set the panel for the notation output.
Parameters:
notationPanel - The panel for the output.