From 9a42ba810679a872f315cb8d5f09c7fc6d12f8e6 Mon Sep 17 00:00:00 2001 From: Zhang Anjun Date: Fri, 18 Jul 2025 15:43:54 +0800 Subject: [PATCH] v1.1 --- Minesweeper.cpp | 8 ++++++++ Minesweeper.h | 2 ++ 2 files changed, 10 insertions(+) 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);