games: Make Splendor end after last player has completed their turn - #118
Open
TannPat wants to merge 1 commit into
Open
games: Make Splendor end after last player has completed their turn#118TannPat wants to merge 1 commit into
TannPat wants to merge 1 commit into
Conversation
… someone got winning points.
PartMan7
self-requested a review
August 24, 2026 07:13
PartMan7
approved these changes
Aug 24, 2026
PartMan7
left a comment
Owner
There was a problem hiding this comment.
Excellent catch; thanks!
As a minor nit, try to group similar code into paragraphs instead of spacing out each line - you should be able to summarize each paragraph as one sentence (eg: check points/game end if the turn has ended)
PartMan7
reviewed
Aug 24, 2026
| } | ||
|
|
||
| gameCanEnd(): boolean { | ||
| gameCanEnd(turn: Turn | null = this.turn): boolean { |
Owner
There was a problem hiding this comment.
Minor nit; any reason to send this from props? I think it's equivalent in this case.
Also, try to avoid shadowing
PartMan7
reviewed
Aug 24, 2026
Comment on lines
+384
to
+388
| const currentPlayer = this.turn; | ||
|
|
||
| const turnEnded: boolean = this.handlePostTurn(action, playerData, user, player, logEntry); | ||
|
|
||
| if (turnEnded && this.gameCanEnd(currentPlayer)) return this.end(); |
Owner
There was a problem hiding this comment.
Suggested change
| const currentPlayer = this.turn; | |
| const turnEnded: boolean = this.handlePostTurn(action, playerData, user, player, logEntry); | |
| if (turnEnded && this.gameCanEnd(currentPlayer)) return this.end(); | |
| const turnEnded = this.handlePostTurn(action, playerData, user, player, logEntry); | |
| if (turnEnded && this.gameCanEnd()) return this.end(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.