|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectictk.boardgame.chess.io.ChessMoveNotation
the parent class of all ChessNotations. It contains many methods for piece and coordinate (file/rank) notations in many language to be translated into numberic notation (1-8). There are a few pre-set Locales.
Field Summary | |
static long |
DEBUG
Log.debug() mask |
static char[][] |
FILE_SETS
contains file sets for different languages a-h |
static char[][] |
PIECE_SETS
contains piece sets in differnt languages PNBRQK |
static char[][] |
RANK_SETS
for the unlikely case your using non arabic numbers |
Constructor Summary | |
ChessMoveNotation()
|
|
ChessMoveNotation(java.util.Locale loc)
note: different Locales other than the default (English) should only be used for local presentation. |
Method Summary | |
char |
fileToChar(int i)
returns the character representation of the file. |
byte |
fileToNum(char c)
returns the byte representation of the file. |
byte |
fileToNum(java.lang.String s)
returns the byte representation of the file. |
java.util.Locale |
getLocale()
returns the Locale being used with this SAN object. |
char[] |
getPieceSet()
gets the piece set used in the current Locale setting |
char |
pieceToChar(ChessPiece p)
returns the character representation of the piece in the correct Locale. |
char |
pieceToChar(int p)
returns the character representation of the piece in the correct Locale. |
byte |
pieceToNum(char c)
returns the number Piece.getIndex() from the character representation of the piece. |
byte |
pieceToNum(java.lang.String s)
returns the number Piece.getIndex() from the character representation of the piece. |
char |
rankToChar(int i)
returns the character representation of the rank. |
byte |
rankToNum(char c)
returns the byte representation of the rank. |
boolean |
setLocale(java.util.Locale loc)
sets the Locale for the ChessMoveNotation to use localised piece representations. |
void |
setPieceSet(char[] set)
sets a custom piece set. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ictk.boardgame.io.MoveNotation |
moveToString, resultToString, stringToMove, stringToResult |
Field Detail |
public static final long DEBUG
public static final char[][] PIECE_SETS
public static final char[][] FILE_SETS
public static final char[][] RANK_SETS
Constructor Detail |
public ChessMoveNotation()
public ChessMoveNotation(java.util.Locale loc)
Method Detail |
public boolean setLocale(java.util.Locale loc)
public java.util.Locale getLocale()
public char[] getPieceSet()
public void setPieceSet(char[] set)
public byte pieceToNum(java.lang.String s)
public byte pieceToNum(char c)
public char pieceToChar(int p)
public char pieceToChar(ChessPiece p)
public byte fileToNum(java.lang.String s)
public byte fileToNum(char c)
public byte rankToNum(char c)
public char fileToChar(int i)
public char rankToChar(int i)
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |