diff --git a/Minesweeper.cpp b/Minesweeper.cpp index bb6bb25..a4a7b63 100644 --- a/Minesweeper.cpp +++ b/Minesweeper.cpp @@ -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; } diff --git a/Minesweeper.h b/Minesweeper.h index 67bb4ed..f9bd15d 100644 --- a/Minesweeper.h +++ b/Minesweeper.h @@ -15,6 +15,8 @@ struct Cell { int mineNum; }; +void copyrightNotice(); + void minesweeper(); void initBoard(Cell(*ptrBoard)[9], const int maxRow, const int maxCol);