-
Notifications
You must be signed in to change notification settings - Fork 399
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
Fixing ordering of GamePlayer in sidePanel #12958
base: master
Are you sure you want to change the base?
Fixing ordering of GamePlayer in sidePanel #12958
Conversation
Signed-off-by: Rene Florian <rene.florian@intrak.sk>
@frigoref could you look at this pull request and give me feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Have a look for the comments. You can close the one where nothing is to be done (PlayerOrder) and leave the other one (PlayerOrderComparator) to @DanVanAtta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Method
iterator
: Forcing the iterator to work on the sorted list is likely an overkill. - Method
stream
: Did you check that it compiles afterwards? For me I get for example:
triplea\game-app\game-core\src\main\java\games\strategy\triplea\attachments\AbstractConditionsAttachment.java:74: error: stream() has private access in PlayerList getData().getPlayerList().stream()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Method
iterator
: Forcing the iterator to work on the sorted list is likely an overkill.- Method
stream
: Did you check that it compiles afterwards? For me I get for example:
triplea\game-app\game-core\src\main\java\games\strategy\triplea\attachments\AbstractConditionsAttachment.java:74: error: stream() has private access in PlayerList getData().getPlayerList().stream()
- I'll revert the change.
- Checked it didnt work afther I played with it and forgot to change it back. I'll change it in next commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forcing method currentPlayers
to work on the sorted list is likely an overkill. We only want it for the UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forcing method
currentPlayers
to work on the sorted list is likely an overkill. We only want it for the UI.
I'll revert the change.
game-app/game-core/src/main/java/games/strategy/triplea/printgenerator/PlayerOrder.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably something for another fix, but the methods GameStep.isXxxStep
all work on the game step name while their method names ...Step refer to the GameStep object. Hence, either the methods should be rename to something like ...StepName and/or the parameters passed should be rather of type GameStep.
Also, it seems odd to me to have null
a a step name.
@DanVanAtta: Can you explain why/if this is really needed?
@RenXFlo Did you check whether the ordering is still fixed? |
Fixed ordering for EconomyPanels in game (tested on 3 maps TWW included)