diff --git a/main.cpp b/main.cpp index 5d1589a..11fdd93 100644 --- a/main.cpp +++ b/main.cpp @@ -246,10 +246,10 @@ void printBoard(char **board, int x, int y) { int maxLength = 0; for (int i = 0; i < x; ++i) { int length = 2 + (i >= 10 ? 2 : 1); - for(int j = 0; j < y; ++j) { - length = max(length, (int)ans[i + 2][j + 2].size()); - } - maxLength = max(maxLength, length); + for (int j = 0; j < y; ++j) { + length = max(length, (int) ans[i + 2][j + 2].size()); + } + maxLength = max(maxLength, length); } // Print the first two rows with the calculated spaces @@ -258,6 +258,9 @@ void printBoard(char **board, int x, int y) { pt ' '; } for (int j = 0; j < y; ++j) { + if (!j) { + pt ' '; + } pt ans[i][j]; } pt nl; @@ -266,7 +269,7 @@ void printBoard(char **board, int x, int y) { // Print the rest of the board for (int i = 2; i < boardX; ++i) { for (int j = 0; j < boardY; ++j) { - if (j==2) { + if (j == 2) { pt ' '; } pt ans[i][j];