Skip to content

Commit b52da84

Browse files
committed
Merge branch 'develop'
2 parents e575bcb + 55c68eb commit b52da84

3 files changed

Lines changed: 32 additions & 18 deletions

File tree

locales/en/apgames.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5975,7 +5975,8 @@
59755975
"NOPLACEMENTS": "You cannot move the workers such that you have no valid placements available.",
59765976
"PARTIAL_MOVE": "Provide the destination.",
59775977
"PARTIAL_PLACE": "Choose a cell to place a piece in.",
5978-
"PARTIAL_PLACE_SIZE": "Select the size of a piece to place."
5978+
"PARTIAL_PLACE_SIZE": "Select the size of a piece to place.",
5979+
"VALID_MOVE": "Looks like a valid move. You can also click the cell again to select the next available piece size."
59795980
},
59805981
"valley": {
59815982
"BAD_VARIANT": "You can only move towers in the Moon Labyrinth variant.",

src/games/minefield.ts

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class MinefieldGame extends GameBase {
4040
urls: [
4141
"https://www.marksteeregames.com/Minefield_rules.pdf",
4242
"https://boardgamegeek.com/thread/3295906/new-mark-steere-game-minefield",
43-
"https://boardgamegeek.com/thread/3299199/cartwheel-possibly-free-of-mutual-zugzwang",
43+
"https://boardgamegeek.com/thread/3296675/pinwheel-minimal-restrictions",
4444
],
4545
people: [
4646
{
@@ -494,25 +494,36 @@ export class MinefieldGame extends GameBase {
494494
protected checkEOG(): MinefieldGame {
495495
const prevPlayer = this.currplayer === 1 ? 2 : 1;
496496

497-
const graph = this.buildGraph(prevPlayer);
498-
const [sources, targets] = this.lines[prevPlayer - 1];
499-
for (const source of sources) {
500-
for (const target of targets) {
501-
if ( (graph.hasNode(source)) && (graph.hasNode(target)) ) {
502-
const path = bidirectional(graph, source, target);
503-
if (path !== null) {
504-
this.gameover = true;
505-
this.winner = [prevPlayer];
506-
this.connPath = [...path];
507-
break;
497+
let passedOut = false;
498+
if ( (this.lastmove === "pass") && (this.stack[this.stack.length - 1].lastmove === "pass") ) {
499+
passedOut = true;
500+
}
501+
502+
if (passedOut) {
503+
this.gameover = true;
504+
this.winner = [1,2];
505+
} else {
506+
const graph = this.buildGraph(prevPlayer);
507+
const [sources, targets] = this.lines[prevPlayer - 1];
508+
for (const source of sources) {
509+
for (const target of targets) {
510+
if ( (graph.hasNode(source)) && (graph.hasNode(target)) ) {
511+
const path = bidirectional(graph, source, target);
512+
if (path !== null) {
513+
this.gameover = true;
514+
this.winner = [prevPlayer];
515+
this.connPath = [...path];
516+
break;
517+
}
508518
}
509519
}
510-
}
511-
if (this.gameover) {
512-
break;
520+
if (this.gameover) {
521+
break;
522+
}
513523
}
514524
}
515525

526+
516527
if (this.gameover) {
517528
this.results.push(
518529
{type: "eog"},

src/games/urbino.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,11 @@ export class UrbinoGame extends GameBase {
720720
}
721721

722722
// we're good
723+
// always return complete = 0 to allow continued clicking to rotate through pieces sizes
723724
result.valid = true;
724-
result.complete = 1;
725-
result.message = i18next.t("apgames:validation._general.VALID_MOVE");
725+
result.canrender = true;
726+
result.complete = 0;
727+
result.message = i18next.t("apgames:validation.urbino.VALID_MOVE");
726728
return result;
727729
}
728730

0 commit comments

Comments
 (0)