private String getRowString(int y) {
    String s = "";
    for (int x = 0; x < max_x; x++) {
      switch (board[x][y]) {
      case 0:
        s += " ";
        break;
      case 1:
        s += "O";
        break;
      case 2:
        s += "X";
      }

      if (x != max_x - 1) {
        s += " | ";
      }
    }

    s += String.format("%" + HSPACE + "s", "");

    for (int i = 0; i < max_x; i++) {
      s += y * 3 + i + 1;

      if (i == max_y - 1) {
        s += "\n";
      } else {
        s += " | ";
      }
    }
    return s;
  }