Skip to content

Refactor Monopoly solver helpers#165

Draft
alexanderthclark wants to merge 1 commit into
mainfrom
codex/refactor-monopoly-solver
Draft

Refactor Monopoly solver helpers#165
alexanderthclark wants to merge 1 commit into
mainfrom
codex/refactor-monopoly-solver

Conversation

@alexanderthclark
Copy link
Copy Markdown
Owner

Summary

  • Refactor Monopoly._solve() into smaller private helpers for candidate generation, domain checks, profit evaluation, and output assignment.
  • Preserve the existing solver behavior and public API, including q, p, profit, __repr__(), and _repr_latex_().
  • Add regression tests for zero-output fallback and fixed-cost behavior so this cleanup does not accidentally introduce shutdown logic or other economic behavior changes.

Validation

  • pytest -q tests/test_monopoly.py passed: 9 passed.
  • pytest -q passed: 139 passed, 2 warnings.
  • PYLINTHOME=/private/tmp/pylint-home python -m pylint freeride/monopoly.py passed: 10.00/10.

Notes

This is intended as a behavior-preserving readability cleanup only. It does not change docs, version numbers, or monopoly economics.

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.

1 participant