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

AI - place units on non infra factories #3645

Merged
merged 4 commits into from
Jul 29, 2018

Conversation

ron-murhammer
Copy link
Member

Overview

Addresses post: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback/110. AI only changes.

Functional Changes

Have the AI be able to use non-infra factories to place units.

Manual Testing Performed

@codecov-io
Copy link

Codecov Report

Merging #3645 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3645      +/-   ##
============================================
- Coverage     22.55%   22.52%   -0.03%     
- Complexity     5983     6064      +81     
============================================
  Files           822      822              
  Lines         71032    72528    +1496     
  Branches      11479    11985     +506     
============================================
+ Hits          16019    16340     +321     
- Misses        52922    54076    +1154     
- Partials       2091     2112      +21
Impacted Files Coverage Δ Complexity Δ
...es/strategy/triplea/ai/pro/ProNonCombatMoveAi.java 0.21% <0%> (ø) 1 <0> (ø) ⬇️
...games/strategy/triplea/ai/pro/util/ProMatches.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...strategy/triplea/ai/pro/util/ProPurchaseUtils.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...tegy/triplea/ai/pro/data/ProPurchaseTerritory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...a/games/strategy/triplea/ai/pro/ProPurchaseAi.java 0.32% <0%> (-0.01%) 1 <0> (ø)
...games/strategy/triplea/ai/pro/ProCombatMoveAi.java 0.35% <0%> (ø) 1 <0> (ø) ⬇️
...tegy/engine/message/unifiedmessenger/EndPoint.java 76.47% <0%> (-4.42%) 14% <0%> (-1%)
.../strategy/engine/data/BombingUnitDamageChange.java 66.66% <0%> (-2.57%) 7% <0%> (ø)
.../games/strategy/triplea/ui/screen/TileManager.java 3.69% <0%> (-0.37%) 12% <0%> (+4%)
...c/main/java/games/strategy/ui/SwingComponents.java 8.61% <0%> (-0.03%) 15% <0%> (+6%)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e67003...6645fd0. Read the comment docs.

ProPurchaseUtils.findPurchaseOptionsForTerritory(player, purchaseOptions.getFactoryOptions(), maxTerritory,
isBid);
final List<ProPurchaseOption> purchaseOptionsForTerritory = ProPurchaseUtils
.findPurchaseOptionsForTerritory(player, purchaseOptions.getFactoryOptions(), maxTerritory, isBid);
Copy link
Member

Choose a reason for hiding this comment

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

Just noting in case it wasn't your intention... this line is still calling the four-parameter version of findPurchaseOptionsForTerritory() where t == factoryTerritory. Assuming you thought you were going to add the fifth parameter here but changed your mind and left the reformatted line in place. Since the enclosing method is purchaseFactory(), I'm guessing that's a safe assumption. 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's exactly the case. I realized factoryOptions were only land territories so didn't need the fifth parameter.

@ssoloff ssoloff merged commit 778591f into master Jul 29, 2018
@RoiEXLab RoiEXLab deleted the AI_Place_Units_On_Non_Infra_Factories branch July 29, 2018 09:24
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.

3 participants