We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d1a155 commit fa61470Copy full SHA for fa61470
1 file changed
src/ps/games/splendor/index.ts
@@ -112,7 +112,7 @@ export class Splendor extends BaseGame<State> {
112
113
AllTokenTypes.forEach(tokenType => {
114
const meta = metadata.types[tokenType].startCount;
115
- const reduceTokens = meta[playerCount - 2] ?? 0 - meta[playerCount - 2 - 1] ?? 0;
+ const reduceTokens = (meta[playerCount - 2] ?? 0) - (meta[playerCount - 2 - 1] ?? 0);
116
this.state.board.tokens[tokenType] += playerData.tokens[tokenType] - reduceTokens;
117
playerData.tokens[tokenType] = 0;
118
if (this.state.board.tokens[tokenType] < 0) this.state.board.tokens[tokenType] = 0;
0 commit comments