-
Notifications
You must be signed in to change notification settings - Fork 391
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
Fix up and reinstate #1646 to not remove infrastructure units #2080
Fix up and reinstate #1646 to not remove infrastructure units #2080
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2080 +/- ##
============================================
+ Coverage 18.6% 18.98% +0.38%
- Complexity 5378 5522 +144
============================================
Files 777 777
Lines 77713 78222 +509
Branches 12906 13135 +229
============================================
+ Hits 14456 14852 +396
- Misses 61201 61288 +87
- Partials 2056 2082 +26
Continue to review full report at Codecov.
|
Even better, put the DiceRoll methods into the new method. Much more modular than before.
@simon33-2 can you walk us through the testing for this? |
There's 4 cases I'm aware of.
|
@simon33-2 So what about the following case:
I believe that is possible to have a map like that today and this change would break that. Is that a valid case? |
In that case you should not be able to retreat, at least in any of the Axis and Allies games. That is the bug referred to in #1270. |
Does it need a map property, if there are maps where it is valid to not take the territory? |
@simon33-2 sorry to say, though this is incredibly hard to follow and nobody is shepherding this. I reviewed the description over the last 10 minutes, it's daunting to see text from: #1952 and that the updates in #1953 references more updates. I do not wish for PR's to be sitting for upwards of a month! I think more info is needed before this can really be considered in its due merit. At this point is where it becomes apparent that TripleA is a pain in the ass project. It seems simple because all the code is so straight forward and procedural, but then when it comes time to design and testing you start seeing all the technical debt and extra time you have to pay. For this PR:
|
@simon33-2 Never mind. I reviewed the call it makes to remove units and includes dependents. I'm gonna merge this now. @DanVanAtta This has gone back and forth a few times. Its primarily to address #1270. Previous attempts caused other issues but this appears to work properly by checking total attack/defense and remove infra units from being killed off. |
Thanks @ron-murhammer @DanVanAtta . The problem with #1646 was that there was a case I wasn't aware of. |
Users have reported a 2x degradation in the performance of the Battle Calculator since build 3635. Approximately 75% of that degradation was traced to triplea-game#2080.
This seems to resolve the issue in Greyhawk_Wars from #1952 #1953.
Works in WW2 v5 & Classic so I'm not sure of any other cases (Global has the same rules as v5 for these purposes).