Internet Chess ToolKit
v0.2.0

ictk.boardgame.chess
Class ChessResult

java.lang.Object
  extended byictk.boardgame.chess.ChessResult
All Implemented Interfaces:
Result

public class ChessResult
extends java.lang.Object
implements Result

Setting this for a particular move indicates the termination of the chess game.


Field Summary
static int BLACK_WIN
          the game is unfinished
static int DRAW
          the game is unfinished
static int UNDECIDED
          the game is unfinished
static int WHITE_WIN
          the game is unfinished
 
Constructor Summary
ChessResult(int i)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          test to make sure the indexes are equal
 int getIndex()
          gets the index UNDECIDED, DRAW etc
 int hashCode()
           
 boolean isBlackWin()
           
 boolean isDraw()
           
 boolean isUndecided()
          returns true if the game is yet undecided.
 boolean isWhiteWin()
           
 void set(int i)
          sets the result as UNDECIDED, DRAW, etc
 java.lang.String toString()
          returns the basic PGN forms that represend UNDECIDED, etc Should only be used for diagnostics.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDECIDED

public static final int UNDECIDED
the game is unfinished

See Also:
Constant Field Values

DRAW

public static final int DRAW
the game is unfinished

See Also:
Constant Field Values

WHITE_WIN

public static final int WHITE_WIN
the game is unfinished

See Also:
Constant Field Values

BLACK_WIN

public static final int BLACK_WIN
the game is unfinished

See Also:
Constant Field Values
Constructor Detail

ChessResult

public ChessResult(int i)
Method Detail

set

public void set(int i)
sets the result as UNDECIDED, DRAW, etc


getIndex

public int getIndex()
gets the index UNDECIDED, DRAW etc


isUndecided

public boolean isUndecided()
Description copied from interface: Result
returns true if the game is yet undecided.

Specified by:
isUndecided in interface Result

isWhiteWin

public boolean isWhiteWin()

isDraw

public boolean isDraw()

isBlackWin

public boolean isBlackWin()

toString

public java.lang.String toString()
returns the basic PGN forms that represend UNDECIDED, etc Should only be used for diagnostics.


equals

public boolean equals(java.lang.Object obj)
test to make sure the indexes are equal


hashCode

public int hashCode()

Submit a bug or feature
Visit the Website
Internet Chess ToolKit is licensed under the GPL v2 .