use recommend CMake option and add check for n&m
This commit is contained in:
@ -6,6 +6,5 @@ set(CMAKE_CXX_FLAGS "-g -O2")
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
add_executable(server main.cpp)
|
||||
add_executable(advanced advanced.cpp)
|
||||
|
||||
# add_executable(client advanced.cpp) # For advanced task
|
||||
add_executable(client advanced.cpp) # For advanced task
|
@ -39,6 +39,7 @@ int number_of_all_mines; // The number of all mines
|
||||
void InitMap() {
|
||||
using namespace std;
|
||||
std::cin >> rows >> columns;
|
||||
assert(2 <= rows && rows <= 30 && 2 <= columns && columns <= 30);
|
||||
for (int i = 0; i < rows; i++) {
|
||||
cin >> origin_map[i];
|
||||
assert(strlen(origin_map[i]) == columns);
|
||||
|
Reference in New Issue
Block a user