#include \n#include \n\nconst int BOARD_SIZE = 19;\n\nenum class Stone {\n EMPTY, \n BLACK, \n WHITE\n};\n\nclass GoGame {\nprivate:\n std::vector<std::vector> board;\n Stone currentPlayer;\n\npublic:\n GoGame() {\n board.resize(BOARD_SIZE, std::vector(BOARD_SIZE, Stone::EMPTY));\n currentPlayer = Stone::BLACK; // 黑棋先行\n }\n\n void printBoard() {\n for (int i = 0; i < BOARD_SIZE; ++i) {\n for (int j = 0; j < BOARD_SIZE; ++j) {\n if (board[i][j] == Stone::EMPTY) {\n std::cout << "+";\n } else if (board[i][j] == Stone::BLACK) {\n std::cout << "●";\n } else if (board[i][j] == Stone::WHITE) {\n std::cout << "○";\n }\n }\n std::cout << std::endl;\n }\n }\n\n bool isValidMove(int row, int col) {\n if (row < 0 || row >= BOARD_SIZE || col < 0 || col >= BOARD_SIZE) {\n return false;\n }\n return board[row][col] == Stone::EMPTY;\n }\n\n void makeMove(int row, int col) {\n if (isValidMove(row, col)) {\n board[row][col] = currentPlayer;\n currentPlayer = (currentPlayer == Stone::BLACK) ? Stone::WHITE : Stone::BLACK;\n } else {\n std::cout << "Invalid move!" << std::endl;\n }\n }\n};\n\nint main() {\n GoGame game;\n\n int row, col;\n while (true) {\n game.printBoard();\n\n std::cout << "Current player: " << ((game.getCurrentPlayer() == Stone::BLACK) ? "Black" : "White") << std::endl;\n std::cout << "Enter row and column (0-18) to make a move: ";\n std::cin >> row >> col;\n\n game.makeMove(row, col);\n }\n\n return 0;\n}