-
Notifications
You must be signed in to change notification settings - Fork 1
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
[HOTFIX#193] Fixed acceptProposal RPC for not properly cleaning exchanged cards from custom decks #199
[HOTFIX#193] Fixed acceptProposal RPC for not properly cleaning exchanged cards from custom decks #199
Conversation
…from custom decks. Also Refactored acceptProposal RPC for code cleanliness and moved decks updating to separate function, updateUserDecks
} | ||
} | ||
} else if (deckName.equals(WISHED_DECK)) { | ||
Map<Integer, List<PhysicalCard>> lookUp = deck.getPhysicalCards().stream().collect( |
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.
Nice to have the lookup table included in this method seeing that is used only here
// save | ||
deckMap.put(proposal.getReceiverUserEmail(), receiverDecks); | ||
deckMap.put(proposal.getSenderUserEmail(), senderDecks); | ||
deckMap.put(proposal.getReceiverUserEmail(), DeckServiceImpl.updateUserDecks(deckMap.get(proposal.getReceiverUserEmail()), proposal.getSenderPhysicalCards(), proposal.getReceiverPhysicalCards())); |
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.
Awsome compaction
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.
A really great job
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.
Great job, cod is clear and clean. The methods are now much more concise but well-structured.
This PR fixes the bug explained in issue #193. Also Refactored acceptProposal RPC for code cleanliness and moved decks updating to separate function
updateUserDecks
.