Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1850] Fix price protection #9970

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

vandamm
Copy link
Collaborator

@vandamm vandamm commented Dec 4, 2023

Before clicking "Create"

  • Branch is derived from the latest master
  • Add the pins label if this change will break existing games
  • Code passes linter with docker compose exec rack rubocop -a
  • Tests pass cleanly with docker compose exec rack rake

Implementation Notes

Explanation of Change

Per 1850 rules a president can use price protection even if he already sold shares in the company.
photo_2023-11-29 13 59 35
This is different from 1870 rules, so this fix is needed.

Any Assumptions / Hacks

  • I've decided to not allow president to use price protection to buy the shares he sold himself, otherwise it leads to possible infinite SRs.
  • Migrate script was able to repair the fixture, so most possibly pins won't be needed, only migration of existing games as they are easily fixable by adding a pass.

@vandamm vandamm added the 1850 label Dec 8, 2023
@tobymao tobymao merged commit 595dd77 into tobymao:master Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants