From 9023f43291b894f7670df2ffe513808ef6360954 Mon Sep 17 00:00:00 2001 From: scratko Date: Sun, 10 Nov 2024 15:16:31 +0300 Subject: Added end game check --- puzzle.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'puzzle.cpp') diff --git a/puzzle.cpp b/puzzle.cpp index 50b32af..ca55ef9 100644 --- a/puzzle.cpp +++ b/puzzle.cpp @@ -47,6 +47,7 @@ void GameParams::NextUntestedPuzzles() /* * ======== creating puzzles =========== */ + win->begin(); for(int i = 0; i < puzzle_pieces; ++i) { tmp_puzzle = std::unique_ptr(new Puzzle(standard_puzzle_coordinates[i].x, @@ -65,6 +66,7 @@ void GameParams::NextUntestedPuzzles() tmp_puzzle->callback(press_button_callback, this); puzzles.push_back(std::move(tmp_puzzle)); } + win->end(); ResetFreePuzzles(); } @@ -84,10 +86,3 @@ void GameParams::CreateNewPuzzles() NextUntestedPuzzles(); } while(!IsSolvability()); } - -void GameParams::NewGame() -{ - ResetFreePuzzles(); - CreateNewPuzzles(); - SetXYEmptyBox(215, 215); -} -- cgit v1.2.3