diff options
author | scratko <m@scratko.xyz> | 2024-11-10 15:16:31 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-11-11 22:04:21 +0300 |
commit | 9023f43291b894f7670df2ffe513808ef6360954 (patch) | |
tree | e7b4c4d3689bcda7f4bfc949bc3f2ac1d580fc07 /puzzle.cpp | |
parent | 0ddc597a0f2eeb0dc49f8a6ab4a8af0d615b6ece (diff) | |
download | picture-puzzle-9023f43291b894f7670df2ffe513808ef6360954.tar.gz picture-puzzle-9023f43291b894f7670df2ffe513808ef6360954.tar.bz2 picture-puzzle-9023f43291b894f7670df2ffe513808ef6360954.zip |
Added end game check
Diffstat (limited to 'puzzle.cpp')
-rw-r--r-- | puzzle.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -47,6 +47,7 @@ void GameParams::NextUntestedPuzzles() /* * ======== creating puzzles =========== */ + win->begin(); for(int i = 0; i < puzzle_pieces; ++i) { tmp_puzzle = std::unique_ptr<Puzzle>(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); -} |