该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
创建一个console控制台。创建一个棋盘数组。这个是绘制棋盘的大体函数。看看你就知道了
void Drewcheckboards() {
system("cls");
//行
for (int i = 0; i < CheckBoardSize; i++) {
//列
for (int j = 0; j < CheckBoardSize; j++) {
//光标
if (i == g_cursorX && j == g_cursorY) {
std::cout << "╬";
}
else if (g_checkboards[i][j] == 1) {
std::cout << "●";
}
else if (g_checkboards[i][j] == 2)
{
std::cout << "◎";
}
//棋盘
else if (i == 0 and j == 0) {
std::cout << "┍";
}
else if (i == 0 and j == (CheckBoardSize - 1)) {
std::cout << "┑";
}
else if (i == (CheckBoardSize - 1) and j == 0) {
std::cout << "┕";
}
else if (i == (CheckBoardSize - 1) and j == (CheckBoardSize - 1)) {
std::cout << "┙";
}
else if (i == 0) {
std::cout << "┯";
}
else if (j == 0) {
std::cout << "├";
}
else if (i == CheckBoardSize - 1) {
std::cout << "┷";
}
else if (j == CheckBoardSize - 1) {
std::cout << "┤";
}
else {
std::cout << "┿";
}
}
std::cout << "\n";
}
}