TextIO { public static String squareToString(int square) { StringBuilder ret = new StringBuilder(); int x = Position.getX(square); int y = Position.getY(square); ret.append((char) (x + 'a')); ret.append((char) (y + '1')); return ret.toString(); }  static Position readFEN(String fen); static void fixupEPSquare(Position pos); static String toFEN(Position pos); static String moveToString(Position pos, Move move, boolean longForm); static String moveToUCIString(Move m); static Move uciStringToMove(String move); static Move stringToMove(Position pos, String strMove); static int getSquare(String s); static String squareToString(int square); static String asciiBoard(Position pos); static final String startPosFEN; }
@Test public void testSquareToString() { System.out.println("squareToString"); assertEquals("a1", TextIO.squareToString(Position.getSquare(0, 0))); assertEquals("h6", TextIO.squareToString(Position.getSquare(7, 5))); assertEquals("e4", TextIO.squareToString(Position.getSquare(4, 3))); }