Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
pvanwamelen committed Nov 9, 2024
2 parents 2e4e039 + a03e4cf commit 3590b9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion locales/en/apgames.json
Original file line number Diff line number Diff line change
Expand Up @@ -3685,7 +3685,8 @@
"PARTIAL_PIECE_MOVE": "Provide the destination for your piece.",
"REPEAT_RECEIVER": "You can't move the ball to the same piece twice in a row.",
"REPEATED_POSITION": "This move would repeat an earlier position and is therefore invalid.",
"START_BALL_MOVE": "Provide a destination for the ball."
"START_BALL_MOVE": "Provide a destination for the ball.",
"NO_AVAILABLE_RECEIVERS": "You can not move the ball as there are no eligible receivers."
},
"realm": {
"ALIGNED_BASE": "You may not place a base that shares a row or column with another friendly base unless (a) you have no other options or (b) you are playing with the 'Relaxed Placement' variant.",
Expand Down
17 changes: 12 additions & 5 deletions src/games/razzle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,18 @@ export class RazzleGame extends GameBase {
);
return result;
} else {
result.valid = true;
result.complete = 1;
result.message = i18next.t(
"apgames:validation._general.VALID_MOVE"
);
if (cells.length === 1) {
result.valid = false;
result.message = i18next.t(
"apgames:validation.razzle.NO_AVAILABLE_RECEIVERS"
);
} else {
result.valid = true;
result.complete = 1;
result.message = i18next.t(
"apgames:validation._general.VALID_MOVE"
);
}
return result;
}
}
Expand Down

0 comments on commit 3590b9e

Please sign in to comment.