diff --git a/src/advanced.cpp b/src/advanced.cpp index 4051233..637f3f3 100644 --- a/src/advanced.cpp +++ b/src/advanced.cpp @@ -15,7 +15,7 @@ void Execute(int row, int column) { std::string str; VisitBlock(row, column); if (game_state != 0) { - PrintMap(); // this line may help you debug + // PrintMap(); // this line may help you debug ExitGame(); } std::ostringstream oss; @@ -35,8 +35,8 @@ void Execute(int row, int column) { // stores the output recently ReadMap(); std::cin.rdbuf(old_input_buffer); // Restore the input buffer - PrintMap(); // These two lines may help you debug - std::cout << std::endl; + // PrintMap(); // These two lines may help you debug + // std::cout << std::endl; } int main() { diff --git a/src/include/client.h b/src/include/client.h index fab54cd..11d0ee1 100644 --- a/src/include/client.h +++ b/src/include/client.h @@ -54,8 +54,8 @@ void InitGame() { * 01? */ namespace Client { -const unsigned int RndSeed = 21212303; // std::random_device{}(); -std::mt19937 RawRnd(RndSeed); // a basic random generator +const unsigned int RndSeed = std::random_device{}(); +std::mt19937 RawRnd(RndSeed); // a basic random generator const int max_size = 35; char game_map[max_size][max_size]; // store the raw game map in format of char std::queue > @@ -132,6 +132,7 @@ std::vector > variaID_to_position; * @details This function is designed to print the equations for debugging */ void PrintEquations(std::vector > equations) { + return; std::cout << "equations:" << std::endl; for (int i = 0; i < equations.size(); i++) { for (int j = 0; j < equations[i].size(); j++) @@ -266,8 +267,8 @@ std::vector > GaussianJordanElimination( * equations */ void InterpretResult(std::vector > equations) { - std::cout << "InterpretResult" << std::endl; - PrintEquations(equations); + // std::cout << "InterpretResult" << std::endl; + // PrintEquations(equations); int n = equations.size(); if (n == 0) return; int m = equations[0].size(); @@ -293,11 +294,13 @@ void InterpretResult(std::vector > equations) { if (sol == 0) { map_status[pos.first][pos.second] = 1; no_mine_block_to_be_clicked.push(pos); - std::cout<<"push ("< TotalRandomGuess() { using namespace Client; - std::cout << "TotalRandomGuess" << std::endl; - // use a fixed random key + // std::cout << "TotalRandomGuess" << std::endl; std::uniform_int_distribution row_dis(0, rows - 1), column_dis(0, columns - 1); int row = row_dis(RawRnd), column = column_dis(RawRnd);