|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdebug.FenUtility
public class FenUtility
This class is the FEN Utility used by the debug class. Methods here convert a compressed FEN String into a Position object and visa versa. Note: FEN = Forsynth-Edwards Notation.
Constructor Summary | |
---|---|
FenUtility()
|
Method Summary | |
---|---|
static void |
displayBoard(java.lang.String fen)
Prints to the console a text based graphical representation of the position object with the given FEN string. |
static Position |
loadFEN(java.lang.String fen)
Converts a FEN representation of a Position object into a Position object. |
static java.lang.String |
read(java.lang.String file)
Reads 1 line of a string from a file. |
static java.lang.String |
saveFEN(Position p)
Converts a Position object into a FEN String that represents the object. |
static java.lang.String |
saveFENPlus(boolean ai_colour,
java.lang.String moveList)
Saves the FENPlus string, which consists of a sequence of moves, the colour that the AI is playing in as well as the current moveNumber. |
static void |
write(java.lang.String file,
java.lang.String text)
Writes a string to a file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FenUtility()
Method Detail |
---|
public static Position loadFEN(java.lang.String fen)
fen
- The FEN Representation of a Position Object.
public static java.lang.String saveFEN(Position p)
p
- The position to convert into FEN string.
public static java.lang.String saveFENPlus(boolean ai_colour, java.lang.String moveList)
ai_colour
- The colour that Myriad XSN played during the game.moveList
- The list of moves made during the course of the game.
public static void displayBoard(java.lang.String fen)
fen
- The FEN string representing the Position object.public static void write(java.lang.String file, java.lang.String text) throws java.io.IOException
file
- The name of the file to write to.text
- The text to write to the file.
java.io.IOException
- If any file errors occur, e.g. file unwritable.public static java.lang.String read(java.lang.String file) throws java.io.IOException
file
- The name of the file to read from.
java.io.IOException
- If any file errors occur, e.g. file unreadable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |