This commit is contained in:
2025-07-18 15:43:54 +08:00
parent b20a5e76a1
commit 9a42ba8106
2 changed files with 10 additions and 0 deletions

View File

@@ -36,6 +36,13 @@ int main()
return 0;
}
void copyrightNotice() {
std::cout << "Author: Zhang Anjun" << std::endl
<< "Version: 1.1" << std::endl
<< "(C) 2025 Zhang Anjun. All rights reserved."
<< std::endl << std::endl;
}
void minesweeper()
{
char command;
@@ -53,6 +60,7 @@ void minesweeper()
result = getResult(board, maxRow, maxCol, mineCount);
}
displayBoard(board, result, row, col, maxRow, maxCol, mineCount);
copyrightNotice();
if (result == 1) {
std::cout << "Congratulations, you won this game!" << std::endl;
}

View File

@@ -15,6 +15,8 @@ struct Cell {
int mineNum;
};
void copyrightNotice();
void minesweeper();
void initBoard(Cell(*ptrBoard)[9], const int maxRow, const int maxCol);