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

Air moving with carriers ignore fuel costs #3249

Merged
merged 7 commits into from
Mar 9, 2018

Conversation

ron-murhammer
Copy link
Member

@ron-murhammer ron-murhammer commented Mar 8, 2018

Address 5th point here: https://forums.triplea-game.org/topic/558/fuel-enhancements

Functional Changes

  • During non-combat move, air units that are moved with their carrier no longer cost fuel. During combat move, they do cost fuel for all moves as its consider that they launch from their initial territory to head towards battle.
  • Since air can now potentially move with carriers for no fuel charge, a new unit property needs added since checking 'unitNotMoved' is no longer sufficient for fuelFlatCost.

Testing

  • Tested on WaW Fuel Variant that it works as expected and lines up with the unit tests that were added

@codecov-io
Copy link

Codecov Report

Merging #3249 into master will increase coverage by 0.05%.
The diff coverage is 92%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3249      +/-   ##
============================================
+ Coverage     21.47%   21.53%   +0.05%     
- Complexity     5797     5816      +19     
============================================
  Files           830      830              
  Lines         72696    72742      +46     
  Branches      11854    11858       +4     
============================================
+ Hits          15612    15663      +51     
+ Misses        54984    54981       -3     
+ Partials       2100     2098       -2
Impacted Files Coverage Δ Complexity Δ
...trategy/triplea/delegate/AirMovementValidator.java 73.21% <ø> (+0.76%) 78 <0> (+1) ⬆️
.../games/strategy/triplea/delegate/MoveDelegate.java 48.2% <0%> (-0.25%) 59 <0> (ø)
.../java/games/strategy/triplea/delegate/Matches.java 46.21% <100%> (+0.48%) 368 <2> (+5) ⬆️
.../main/java/games/strategy/triplea/TripleAUnit.java 58.59% <100%> (+0.99%) 50 <2> (+2) ⬆️
...games/strategy/triplea/delegate/MovePerformer.java 72.93% <100%> (-0.21%) 44 <0> (-1)
...rc/main/java/games/strategy/engine/data/Route.java 61.98% <95%> (+6.5%) 57 <9> (+5) ⬆️
.../src/main/java/games/strategy/net/nio/Decoder.java 72.82% <0%> (-1.09%) 24% <0%> (-1%)
...games/strategy/triplea/delegate/MoveValidator.java 52.32% <0%> (+0.22%) 232% <0%> (+1%) ⬆️
... and 1 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 45b2026...f35655a. Read the comment docs.

@Heppisorus
Copy link
Contributor

Who's a sexy boy?

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.

Thank you for the comments and unit tests. It makes it much easier to digest engine logic changes.

@ssoloff ssoloff merged commit a3c3012 into master Mar 9, 2018
@ron-murhammer
Copy link
Member Author

Yeah, its really needed given that there are a lot of things that are pretty quirky and most of it isn't quality code or commented well.

@RoiEXLab RoiEXLab deleted the Air_Moving_With_Carriers_Ignore_Fuel_Costs branch March 9, 2018 08:40
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