|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectview.cl.CommandLineUI
public class CommandLineUI
Provides command line portrait of the game.
| Constructor Summary | |
|---|---|
CommandLineUI()
constructor: Constructs a new CommandLineUI game. |
|
| Method Summary | |
|---|---|
boolean |
isOverDraw(boolean color)
accessor(observer): Checks whether we are at a draw state when the Player with the given color has turn to play and informs by returning a boolean value the end or the continuity of the match. |
boolean |
isOverWin(boolean color)
accessor(observer): Checks whether we are at a check mate(the player with the pieces of the given color) state and informs by returning a boolean value that indicates the end or the continuity of the match. |
boolean |
makeMove(Cell a,
Cell b)
transformer(mutative): Executes the move which is provided by the parameter integers which defines two cells, a source and a destination one. |
boolean |
makeMove(java.lang.String command)
transformer(mutative): Executes the move which is provided by the parameter string in the form of "a2 => a3". |
void |
nextGame()
transformer(mutative): Changes the chess board of the game to show to a next board. |
void |
previousGame()
transformer(mutative): Changes the chess board of the game to show to a previous move. |
void |
showGame()
accessor(selector): Prints the chess board of a game. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandLineUI()
| Method Detail |
|---|
public boolean makeMove(java.lang.String command)
command - String defines the move to be played.
public boolean makeMove(Cell a,
Cell b)
makeMove in interface UserInterfacea - source Cellb - destination Cell
java.lang.InterruptedException
public void nextGame()
throws IllegalViewException
nextGame in interface UserInterfaceIllegalViewException - When there is no next board to go.
public void previousGame()
throws IllegalViewException
previousGame in interface UserInterfaceIllegalViewException - When there is no previous board to go.public void showGame()
showGame in interface UserInterfacepublic boolean isOverDraw(boolean color)
public boolean isOverWin(boolean color)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||