更换黑棋用的字符。

This commit is contained in:
unlockable
2023-03-07 15:59:07 +08:00
parent 4deead2fdb
commit d354e1886c
3 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ std::string ChessPiece::show() {
return "X"; return "X";
} }
if (this->color == BLACK) { if (this->color == BLACK) {
return ""; return "";
} }
else { else {
return ""; return "";

View File

@@ -43,7 +43,7 @@ int main() {
do { do {
std::cout << players[nowMovePlayerIndex]->getName() << " [" std::cout << players[nowMovePlayerIndex]->getName() << " ["
<< (players[nowMovePlayerIndex]->getColor() ? "◯White" << (players[nowMovePlayerIndex]->getColor() ? "◯White"
: "Black") : "Black")
<< "]: " << "]: "
<< "Please enter the coordinate of your new chess piece." << "Please enter the coordinate of your new chess piece."
<< std::endl; << std::endl;

View File

@@ -47,7 +47,7 @@ putChessPieceResult Player::setChess(char row, char column) {
if (this->board->checkWinner(rowCount, columnCount, this->chessType)) { if (this->board->checkWinner(rowCount, columnCount, this->chessType)) {
std::cout << "\n####################\n" std::cout << "\n####################\n"
<< this->playerName << " [" << this->playerName << " ["
<< (this->getColor() ? "◯White" : "Black") << "] " << (this->getColor() ? "◯White" : "Black") << "] "
<< " wins!" << std::endl << " wins!" << std::endl
<< "####################\n"; << "####################\n";
return win; return win;