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

When loading a game, restore dice stats from the history log. #3483

Merged
merged 6 commits into from
Jun 28, 2018
Merged

When loading a game, restore dice stats from the history log. #3483

merged 6 commits into from
Jun 28, 2018

Conversation

asvitkine
Copy link
Contributor

@asvitkine asvitkine commented Jun 25, 2018

Fixes #3478.

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3483      +/-   ##
============================================
- Coverage     21.97%   21.97%   -0.01%     
+ Complexity     5919     5917       -2     
============================================
  Files           836      836              
  Lines         71983    71998      +15     
  Branches      11590    11593       +3     
============================================
- Hits          15820    15819       -1     
- Misses        54075    54089      +14     
- Partials       2088     2090       +2
Impacted Files Coverage Δ Complexity Δ
...va/games/strategy/engine/framework/ServerGame.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...java/games/strategy/triplea/delegate/DiceRoll.java 56.47% <0%> (-0.1%) 105 <0> (ø)
...rategy/triplea/attachments/UnitTypeComparator.java 46.15% <0%> (-7.7%) 12% <0%> (-1%)
.../strategy/triplea/odds/calculator/DummyPlayer.java 35.22% <0%> (-1.14%) 9% <0%> (-1%)
...rc/main/java/games/strategy/net/nio/NioWriter.java 70.17% <0%> (+1.75%) 20% <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 b59e309...1d0fb62. Read the comment docs.

Copy link
Member

@RoiEXLab RoiEXLab left a comment

Choose a reason for hiding this comment

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

Looks good, just a small comment.
As always: Screenshots are appreciated

PlayerID playerId = gameData.getPlayerList().getPlayerId(playerName);

DiceRoll diceRoll = (DiceRoll) childNode.getRenderingData();
int[] rolls = new int[diceRoll.size()];
Copy link
Member

Choose a reason for hiding this comment

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

As mentioned earlier, we have this weird style guideline to make everything final that's not being changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@asvitkine
Copy link
Contributor Author

Thanks! Comments addressed.

Here's a screenshot of restoring dice stats from a 7-round Great War map saved game.

screen shot 2018-06-27 at 10 42 35 pm

Copy link
Member

@RoiEXLab RoiEXLab left a comment

Choose a reason for hiding this comment

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

👍

@RoiEXLab RoiEXLab merged commit f081dfb into triplea-game:master Jun 28, 2018
@asvitkine asvitkine deleted the dice_saves branch June 30, 2018 03:53
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