de.java_chess.javaChess.game
Interface Game

All Known Implementing Classes:
GameImpl

public interface Game

This interface defines the functionality to store a complete game, including access to all the stages of a game.


Method Summary
 void doPly(Ply ply)
          Add a new ply to the game.
 Ply getLastPly()
          Get the last ply.
 int getNumberOfPlies()
          Get the number of plies in this game.
 boolean hasBeenMoved(Position position)
          Check, if a piece on a given positon was moved from it's initial position.
 void reset()
          Reset the game.
 void undoLastPly()
          Take the last ply back.
 

Method Detail

reset

public void reset()
Reset the game.

doPly

public void doPly(Ply ply)
Add a new ply to the game.

undoLastPly

public void undoLastPly()
Take the last ply back.

getNumberOfPlies

public int getNumberOfPlies()
Get the number of plies in this game.
Returns:
The number of plies in this game.

getLastPly

public Ply getLastPly()
Get the last ply.
Returns:
The last ply.

hasBeenMoved

public boolean hasBeenMoved(Position position)
Check, if a piece on a given positon was moved from it's initial position.
Parameters:
position - The position to check.