Skip to content

Enclose moose - #563

Merged
MikaeldeVerdier merged 18 commits into
mainfrom
enclose_moose
Aug 15, 2026
Merged

Enclose moose#563
MikaeldeVerdier merged 18 commits into
mainfrom
enclose_moose

Conversation

@MikaeldeVerdier

Copy link
Copy Markdown
Contributor

Added support for enclose.moose. Installed one new package (ortools). Let me know if anything looks weird, don't really know what i'm doing!

@georgelgeback

Copy link
Copy Markdown
Contributor

How is optimal_is_unique meant to be used by the app? If the allotted number of walls is more than the one used for the optimal solution, the extra walls can be placed by the solver anywhere outside the enclosed area and lead to optimal_is_unique=false even if there's only one way to place the walls which actually enclose the space. Your test grid has only one enclosed area solution, but three wall-solutions:

.~.    .~W    W~.    
WHW    WHW    WHW
~W~    ~W~    ~W~

No clue if that messes with the way you wanna build the game in the app.

@MikaeldeVerdier

Copy link
Copy Markdown
Contributor Author

optimal_is_unique is currently not used by anything. I just added it because it was interesting to see when creating the level. Since optimal_solution only keeps track of one solution, I prefer the solution to be unique (as does enclose.horse).

…ions so deleted users don't orphan, release date uses factory for default to get actual .now time, block leading or trailing newlines in grid

@georgelgeback georgelgeback left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall really good and I am excited for the new game! I pushed some unambiguous changes directly, but check my comments too.

Comment thread tests/test_enclose_moose.py Outdated
Comment thread db_models/enclose_moose_level_model.py Outdated
Comment thread tests/test_enclose_moose.py
Comment thread api_schemas/enclose_moose_level_schema.py
Comment thread services/enclose_moose_service.py Outdated
@MikaeldeVerdier

Copy link
Copy Markdown
Contributor Author

That should be everything!

@georgelgeback georgelgeback left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some tests and found an error when trying to update wall_budget to None (which we want to have no effect I think), and fixed it by filtering out None values from the updates dict. Check it out and if you're OK with it, the PR LGTM

@MikaeldeVerdier

Copy link
Copy Markdown
Contributor Author

Alright, thanks for the thorough review!

@MikaeldeVerdier
MikaeldeVerdier merged commit dc2d68d into main Aug 15, 2026
1 check passed
@georgelgeback
georgelgeback deleted the enclose_moose branch August 15, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants