Skip to content

Commit 72a1b81

Browse files
authored
Merge pull request #291 from mcdemarco/develop
Frogger: fix a croc bug, mark continuous pool variant experimental
2 parents 4a5901d + 93c953f commit 72a1b81

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

locales/en/apgames.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
"emu": "More information on the Decktet system can be found on the [official Decktet website](https://www.decktet.com). Cards in players' hands are hidden from observers, and they are hidden from opponents until the deck is empty, at which point the players have perfect information, so the hands are revealed. Cards drawn from the discard pile are also always visible to opponents.",
238238
"entropy": "In this implementation, the players play two games simultaneously but with a single shared stream of randomized pieces. Each player places a piece on their *opponent's* Order board and then makes a move on their *own* Order board; players thus act as both Order and Chaos at the same time. The player with the greatest score wins! Since both players had the exact same placement choices, this provides the cleanest measure of relative skill.",
239239
"exxit": "Translations of the rules tend to omit certain nuances. This implementation conforms with the original French edition of the rules.\n\nBecause the board is built out as you play in irregular shapes, the hexes are labelled numerically instead of algebraically. This ensures that the labels don't change as the map grows.",
240-
"frogger": "As in other Decktet games at Abstract Play, the deck is displayed at the bottom of the board and includes both cards in the deck and unknown cards in other players' hands. After the first hand, all cards are drawn from the open draw pool, so hands gradually become open. The discards pile is also displayed.\n\nDue to how randomization works at Abstract Play, forced passes are needed for a player to refill the draw pool in the middle of his turn. These are handled by the server, but a couple of variants for the draw pool have also been added to avoid forced passing.\n\nThe Crocodiles variant is by Jorge Arroyo, the translator of the English rules. The Advanced rules and other minor variants are by P. D. Magnus; they appear in The Decktet Book, where the game is called Xing.",
240+
"frogger": "As in other Decktet games at Abstract Play, the deck is displayed at the bottom of the board and includes both cards in the deck and unknown cards in other players' hands. After the first hand, all cards are drawn from the open draw pool, so hands gradually become open. The discards pile is also displayed.\n\nDue to how randomization works at Abstract Play, forced passes are needed for a player to refill the draw pool in the middle of his turn. Passes are handled automatically by the server, but a there's also a draw pool variant that avoids forced passing if desired.\n\nThe Crocodiles variant is by Jorge Arroyo, the translator of the English rules. The Advanced rules and other minor variants are by P. D. Magnus; they appear in The Decktet Book, where the game is called Xing.",
241241
"garden": "To make it very clear what happened on a previous turn, each move is displayed over four separate boards. The first board shows the game after the piece was first placed. The second board shows the state after adjacent pieces were flipped. The third board shows any harvests. The fourth board is the final game state and is where you make your moves.\n\nIn our implementation, black is always the \"tome\" or tie-breaker colour. The last player to harvest black will have a `0.1` after their score.",
242242
"gyges": "The goal squares are adjacent to all the cells in the back row. The renderer cannot currently handle \"floating\" cells.",
243243
"homeworlds": "The win condition is what's called \"Sinister Homeworlds.\" You only win by defeating the opponent to your left. If someone else does that, the game continues, but your left-hand opponent now shifts clockwise. For example, in a four-player game, if I'm South, then I win if I eliminate West. But if the North player ends up eliminating West, the game continues, but now my left-hand opponent is North.",
@@ -1213,7 +1213,7 @@
12131213
"name": "Free swim"
12141214
},
12151215
"refills": {
1216-
"description": "The draw pool may be refilled during a player's turn, by splitting their actions over two turns.",
1216+
"description": "The draw pool may be refilled during a player's turn, by splitting their actions over two partial turns.",
12171217
"name": "Refills"
12181218
}
12191219
},

src/games/frogger.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class FroggerGame extends GameBase {
8080
{ uid: "freeswim" }, //no check on market card claims
8181
{ uid: "#market" }, //Now called the draw pool. The base setting is no refills.
8282
{ uid: "refills", group: "market", default: true }, //the official rule
83-
{ uid: "continuous", group: "market" }, //continuous small refills
83+
{ uid: "continuous", group: "market", experimental: true }, //continuous small refills
8484
],
8585
categories: ["goal>evacuate", "mechanic>move", "mechanic>bearoff", "mechanic>block", "mechanic>random>setup", "mechanic>random>play", "board>shape>rect", "board>connect>rect", "components>decktet", "other>2+players"],
8686
flags: ["autopass", "custom-buttons", "custom-randomization", "random-start", "experimental"],
@@ -778,9 +778,20 @@ export class FroggerGame extends GameBase {
778778
for (let col = 1; col < this.columns - 1; col++) {
779779
// check for pawn column using the suit board
780780
if ( this.suitboard.has(this.coords2algebraic(col, 3)) ) {
781-
//We have a croc's column; we could go looking for its row
782-
// but we can also just derive it from the stack length.
783-
const crocRow = (((this.stack.length / this.numplayers) - 1) % 3) + 1;
781+
//We have a croc's column; we have to go looking for its row
782+
// because the stack length is unreliable.
783+
let crocRow = 1;
784+
for (let row = 1; row <= 3; row++) {
785+
const cell = this.coords2algebraic(col, row);
786+
if (this.board.has(cell)) {
787+
const occupant = this.board.get(cell);
788+
if (occupant === "X0") {
789+
crocRow = row;
790+
break;
791+
}
792+
}
793+
}
794+
784795
const victimRow = (crocRow % 3) + 1;
785796
const crocFrom = this.coords2algebraic(col, crocRow);
786797
const victimFrom = this.coords2algebraic(col, victimRow);

0 commit comments

Comments
 (0)