From cfc41eb3ccc99b92220115b0710fb821525e1075 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 28 Oct 2023 16:38:07 -0400 Subject: generating a lot of puzzles --- ext/wittle_generator/Generate.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/wittle_generator/Generate.cpp') diff --git a/ext/wittle_generator/Generate.cpp b/ext/wittle_generator/Generate.cpp index 5e38ba8..2a92269 100644 --- a/ext/wittle_generator/Generate.cpp +++ b/ext/wittle_generator/Generate.cpp @@ -491,8 +491,8 @@ void Generate::generate(int width, int height, PuzzleSymbols symbols) { // point the generator fails to add a symbol while still making the solution // correct, the function returns false and must be called again. bool Generate::generateInternal(int width, int height, PuzzleSymbols symbols) { - _width = width; - _height = height; + _width = width * 2 + 1; + _height = height * 2 + 1; initPanel(); @@ -966,7 +966,7 @@ std::vector Generate::get_symbols_in_region( // Place a start point in a random location bool Generate::place_start(int amount) { _starts.clear(); - //_panel->_startpoints.clear(); + _panel->ClearStartpoints(); while (amount > 0) { Point pos = Point(Random::rand() % (_panel->width() / 2 + 1) * 2, Random::rand() % (_panel->height() / 2 + 1) * 2); @@ -1014,7 +1014,7 @@ bool Generate::place_start(int amount) { // Place an exit point in a random location on the edge of the grid bool Generate::place_exit(int amount) { _exits.clear(); - //_panel->_endpoints.clear(); + _panel->ClearExits(); while (amount > 0) { Point pos = Point(Random::rand() % (_panel->width() / 2 + 1) * 2, Random::rand() % (_panel->height() / 2 + 1) * 2); -- cgit 1.4.1