Commit d2093f3a by Paktalin

Fixed printing issues

parent f5fa298f
...@@ -66,7 +66,7 @@ class BoardLayout { ...@@ -66,7 +66,7 @@ class BoardLayout {
else else
buffer.append(pieces[row][column].getRepresentation()); buffer.append(pieces[row][column].getRepresentation());
} }
buffer.append(" " + (ROW_COUNT - row) + NEW_LINE); buffer.append(" " + (row + 1) + NEW_LINE);
} }
buffer.append("abcdefgh"); buffer.append("abcdefgh");
return buffer.toString(); return buffer.toString();
......
...@@ -62,14 +62,14 @@ public class BoardTest extends TestCase { ...@@ -62,14 +62,14 @@ public class BoardTest extends TestCase {
private void verifyPrint() { private void verifyPrint() {
assertEquals( assertEquals(
".KR..... 8\n" + "....rk.. 1\n" +
"P.PB.... 7\n" +
".P..Q... 6\n" +
"........ 5\n" +
".....nq. 4\n" +
".....p.p 3\n" +
".....pp. 2\n" + ".....pp. 2\n" +
"....rk.. 1\n" + ".....p.p 3\n" +
".....nq. 4\n" +
"........ 5\n" +
".P..Q... 6\n" +
"P.PB.... 7\n" +
".KR..... 8\n" +
"abcdefgh", "abcdefgh",
board.print()); board.print());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment