diff options
Diffstat (limited to 'ext/wittle_generator/Generate.cpp')
-rw-r--r-- | ext/wittle_generator/Generate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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) { | |||
491 | // point the generator fails to add a symbol while still making the solution | 491 | // point the generator fails to add a symbol while still making the solution |
492 | // correct, the function returns false and must be called again. | 492 | // correct, the function returns false and must be called again. |
493 | bool Generate::generateInternal(int width, int height, PuzzleSymbols symbols) { | 493 | bool Generate::generateInternal(int width, int height, PuzzleSymbols symbols) { |
494 | _width = width; | 494 | _width = width * 2 + 1; |
495 | _height = height; | 495 | _height = height * 2 + 1; |
496 | 496 | ||
497 | initPanel(); | 497 | initPanel(); |
498 | 498 | ||
@@ -966,7 +966,7 @@ std::vector<int> Generate::get_symbols_in_region( | |||
966 | // Place a start point in a random location | 966 | // Place a start point in a random location |
967 | bool Generate::place_start(int amount) { | 967 | bool Generate::place_start(int amount) { |
968 | _starts.clear(); | 968 | _starts.clear(); |
969 | //_panel->_startpoints.clear(); | 969 | _panel->ClearStartpoints(); |
970 | while (amount > 0) { | 970 | while (amount > 0) { |
971 | Point pos = Point(Random::rand() % (_panel->width() / 2 + 1) * 2, | 971 | Point pos = Point(Random::rand() % (_panel->width() / 2 + 1) * 2, |
972 | Random::rand() % (_panel->height() / 2 + 1) * 2); | 972 | Random::rand() % (_panel->height() / 2 + 1) * 2); |
@@ -1014,7 +1014,7 @@ bool Generate::place_start(int amount) { | |||
1014 | // Place an exit point in a random location on the edge of the grid | 1014 | // Place an exit point in a random location on the edge of the grid |
1015 | bool Generate::place_exit(int amount) { | 1015 | bool Generate::place_exit(int amount) { |
1016 | _exits.clear(); | 1016 | _exits.clear(); |
1017 | //_panel->_endpoints.clear(); | 1017 | _panel->ClearExits(); |
1018 | while (amount > 0) { | 1018 | while (amount > 0) { |
1019 | Point pos = Point(Random::rand() % (_panel->width() / 2 + 1) * 2, | 1019 | Point pos = Point(Random::rand() % (_panel->width() / 2 + 1) * 2, |
1020 | Random::rand() % (_panel->height() / 2 + 1) * 2); | 1020 | Random::rand() % (_panel->height() / 2 + 1) * 2); |