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

Allow setting team presets for external matchmaking #98

Merged
merged 1 commit into from
Nov 5, 2018

Conversation

Brutus5000
Copy link
Member

No description provided.

@coveralls
Copy link

Coverage Status

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

.orElseThrow(() -> new RequestException(requestId, ErrorCode.PLAYER_NOT_AVAILABLE_FOR_MATCHMAKING_OFFLINE, matchParticipant.getId())))
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.

None yet

4 participants