Skip to content

Conversation

@Brutus5000
Copy link
Member

No description provided.

@Brutus5000 Brutus5000 requested a review from micheljung November 3, 2018 13:28
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 84.49% when pulling c99d528 on feature/set-teams into 414b82b on develop.

List<Player> players = presetParticipants.stream()
.map(gameParticipant -> playerService.getOnlinePlayer(gameParticipant.getId())
.orElseThrow(() -> new RequestException(requestId, ErrorCode.PLAYER_NOT_AVAILABLE_FOR_MATCHMAKING_OFFLINE, gameParticipant.getId())))
.peek(player -> Requests.verify(player.getCurrentGame() == null, requestId, ErrorCode.PLAYER_NOT_AVAILABLE_FOR_MATCHMAKING_OFFLINE, player))
Copy link
Member

@1-alex98 1-alex98 Nov 3, 2018

Choose a reason for hiding this comment

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

I know that is not part of the change, but why is it PLAYER_NOT_AVAILABLE_FOR_MATCHMAKING_OFFLINE, it seems to be rather PLAYER_ALREADY in a game right?

Copy link
Member

Choose a reason for hiding this comment

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

if getOnlinePlayer() doesn't return the player the he's not online. sounds correct?

Copy link
Member

Choose a reason for hiding this comment

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

I mean this line .peek(player -> Requests.verify(player.getCurrentGame() == null, requestId, ErrorCode.PLAYER_NOT_AVAILABLE_FOR_MATCHMAKING_OFFLINE, player))

Copy link
Member

Choose a reason for hiding this comment

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

Ah, missed that one on my phone. You're right. #100

Copy link
Member

@micheljung micheljung left a comment

Choose a reason for hiding this comment

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

Solid!

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.

5 participants