diff --git a/EndGamMenu.cpp b/EndGamMenu.cpp index cdbcf06ac8cb80d8e4febf8df8b438560a86c0db..13b8fb0777594cdeb4901ab03b78649af1008cba 100644 --- a/EndGamMenu.cpp +++ b/EndGamMenu.cpp @@ -10,11 +10,11 @@ extern double solveTime; void EndGamMenu::EventLoop() { genv::gout.load_font(R"(../jingle-bells.regular.ttf)", 60, false); - int posX = 400, posY = 200, sizeX = 300, sizeY = 40; + int posX = 400, posY = 200, sizeX = 400, sizeY = 100; exitGame = new SimpleButton(posX, posY, sizeX, sizeY, this, "Exit Game", [](){exit(0);}); - std::string opText = "Completion time: " + std::to_string(solveTime/60) + " seconds"; - completionTime = new StaticTextBox(500, 500, 600, 100, opText, this); + std::string opText = "Completion time: " + std::to_string(solveTime/60) + " minutes"; + completionTime = new StaticTextBox(150, 500, 900, 100, opText, this); genv::event EventHandler; while (genv::gin >> EventHandler) { diff --git a/SudokuApplication.cpp b/SudokuApplication.cpp index f245ee22c6ee1af3f875f9287a02c610fc26df56..390925c836f5aab947a5c73528be0ea83aefbb34 100644 --- a/SudokuApplication.cpp +++ b/SudokuApplication.cpp @@ -108,8 +108,8 @@ void SudokuApplication::EventLoop() { // main event loop if(isSolved()) { // checks if the puzzle is solved auto end = std::chrono::high_resolution_clock::now(); auto elapsedTimeObj = std::chrono::duration_cast<std::chrono::nanoseconds>(end - begin); - elapsedTime = double(elapsedTimeObj.count() * 1e-9); - std:: cout << elapsedTime/60 << " min" << std::endl; + solveTime = double(elapsedTimeObj.count() * 1e-9); + // std:: cout << elapsedTime/60 << " min" << std::endl; break; } genv::gout << genv::refresh; diff --git a/cmake-build-debug/CMakeFiles/Sudoku.dir/Sudoku.cpp.obj b/cmake-build-debug/CMakeFiles/Sudoku.dir/Sudoku.cpp.obj index d0a4b8578109729f20052844150263e7a0c879d8..5424ee09854a3b7048b09c71b23d7b33718642b1 100644 Binary files a/cmake-build-debug/CMakeFiles/Sudoku.dir/Sudoku.cpp.obj and b/cmake-build-debug/CMakeFiles/Sudoku.dir/Sudoku.cpp.obj differ