We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dea5e29 commit 686a96cCopy full SHA for 686a96c
src/games/gyges.ts
@@ -840,6 +840,12 @@ export class GygesGame extends GameBase {
840
const cells = stub.split("-");
841
const start = cells[0];
842
const end = cells[cells.length - 1];
843
+ // must be occupied
844
+ if (!this.board.has(start)) {
845
+ result.valid = false;
846
+ result.message = i18next.t("apgames:validation._general.NONEXISTENT", {where: start});
847
+ return result;
848
+ }
849
// moving piece must be closest to player
850
const firstRow = this.getPlayableRow();
851
if (!start.endsWith(firstRow)) {
0 commit comments