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

Update Logic to Consider endTurnNoPU and Add Income to Resource Bar #3035

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

ron-murhammer
Copy link
Member

@ron-murhammer ron-murhammer commented Feb 19, 2018

Addresses next point of https://forums.triplea-game.org/topic/558/fuel-enhancements

Functional Changes

  • Add estimated income to resource bar:
    image
  • For now, this only takes into account income from territories, units, and NOs. It ignores blockades, war bonds, triggers, relationship upkeep, and bonus income.

Tested

  • Tested various maps including Civil War, revised, global

@codecov-io
Copy link

Codecov Report

Merging #3035 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3035      +/-   ##
============================================
- Coverage     20.52%   20.52%   -0.01%     
  Complexity     5818     5818              
============================================
  Files           820      820              
  Lines         72957    72963       +6     
  Branches      12014    12016       +2     
============================================
  Hits          14978    14978              
- Misses        55887    55893       +6     
  Partials       2092     2092
Impacted Files Coverage Δ Complexity Δ
...in/java/games/strategy/triplea/ui/ResourceBar.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...tegy/triplea/delegate/AbstractEndTurnDelegate.java 1.1% <0%> (-0.02%) 2 <0> (ø)

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 fbd12e4...0406fba. Read the comment docs.

@DanVanAtta DanVanAtta self-requested a review February 19, 2018 15:34
@DanVanAtta
Copy link
Member

👍

@DanVanAtta DanVanAtta merged commit 237ca29 into master Feb 19, 2018
@RoiEXLab RoiEXLab deleted the Add_Income_To_Resource_Bar branch February 19, 2018 15:41
Copy link
Member

@ssoloff ssoloff left a comment

Choose a reason for hiding this comment

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

Neat!

// Only add territory resources if endTurn not endTurnNoPU
final Iterator<GameStep> it = data.getSequence().iterator();
while (it.hasNext()) {
final GameStep step = it.next();
Copy link
Member

Choose a reason for hiding this comment

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

If we're not removing elements during iteration, we can probably collapse these three lines to a for-each loop:

for (final GameStep step : data.getSequence()) {

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.

None yet

4 participants