-
Notifications
You must be signed in to change notification settings - Fork 198
[18esp] fix mz mza cheater token #11721
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this might not work in all cases.
Would it be possible to do something like this, overriding close_corporation
instead of adding the fix_cheater_slot_madrid
method?
def close_corporation(corporation, quiet: false)
if corporation.type == :minor
corporation.placed_tokens.each do |token|
city = token.city
remove_slot = city.tokens.any? { |t| t.cheater? }
city.delete_token!(token, remove_slot: remove_slot)
end
end
super
end
there is no cheater? method, the best i could come up with is city.tokens.size > city.normal_slots |
My mistake, it should have been |
found 2 new minor bugs that i'm adding to this: 2- the rules say that the first run on 2 permanent needs to connect both aranjuez and madrid, not just aranzuez. fixed the logic to reflect that. 3- change the code to token.cheater as suggested, |
add bank info on tenders, fix bug where there one less tender in bank handle pr comments fix mz mza cheater token address pr comments adress pr, fix more minor bugs address pr comments fix error on all 2p trains fix rubycop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bentziaxl Once a review has been started, can you avoid force-pushing to the PR branch? It means the reviewer can't see what has been changed in the newer commits.
MZA and MZ share a single slot city in madrid (f24).
When mz is taken over, and MZA was placed as a cheater token, the closing of MZ doesn't remove the extra slot.
added minor code to fix this behaviour.