We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37a18ad commit 1febbd3Copy full SHA for 1febbd3
src/nodes/Player.ts
@@ -216,9 +216,12 @@ export default class Player extends GameNode {
216
}
217
this.currentState = "pause";
218
if (
219
- await this.board.resolve(campaign[this.#level].scoreBase, (score) => {
220
- this.score += score;
221
- })
+ await this.board.resolve(
+ campaign[Math.min(this.#level, campaign.length - 1)].scoreBase,
+ (score) => {
222
+ this.score += score;
223
+ }
224
+ )
225
) {
226
this.newCurrent();
227
this.currentState = "game";
0 commit comments