Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions locales/en/apgames.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"plurality": "Territorial game where players place trominos to enclosure areas. The player with more stones on a given area's perimeter owns that area.",
"pods": "Natal Seas - Pods is a territorial game where the players take on the metaphorical role of competing whales vying for space to protect their young. Played on a hexagonal board, it uses an innovative mechanism of placements and movements.",
"pontedd": "Players build islands and attempt to connect as many of them as possible by bridge. Most points wins.",
"product": "Players score by multiplying their two largest groups. Largest score wins. If tied, wins the second player.",
"prudh": "Prudh (\"prew\") is a game of shared pieces where one player owns the light squares and the other owns the dark. Manipulate stacks of pieces to earn points. Highest score at the end of the game wins.",
"pylon": "The game is played in two phases: a placement phase, in which all the pyramids are placed onto the board, followed by a stacking phase, in which pyramids are collected into stacks. Control the majority of the pyramids to win.",
"quagmire": "A race to stay afloat as the land gives away underfoot. Walk, run, and jump around the board to hamper the other team, but make sure to leave enough room for your own!",
Expand Down Expand Up @@ -1958,6 +1959,20 @@
"name": "12x12 board"
}
},
"product": {
"size-4": {
"name": "Hexagonal board (base-4)"
},
"#board": {
"name": "Hexagonal board (base-5)"
},
"size-6": {
"name": "Hexagonal board (base-6)"
},
"size-7": {
"name": "Hexagonal board (base-7)"
}
},
"pylon": {
"#setup": {
"description": "The board starts empty, and the first half of the game is the players placing their pyramids."
Expand Down Expand Up @@ -5076,6 +5091,14 @@
"TOO_CLOSE": "Islands may not diagonally touch other islands or sandbars of that colour.",
"TOO_MANY": "You may not place more than two tiles."
},
"product": {
"INSTRUCTIONS": "Players place, on empty hexes, two stones of either color. The only exception is on the first turn, where the first player places just one stone of either color.",
"INCOMPLETE_TURN": "To complete the turn you need two placements.",
"INVALID_PLACEMENT": "Unable to interpret the move notation: {{move}}.",
"NORMALISE": "The move needs to be normalised. Try {{normalised}}.",
"TOO_MANY_MOVES": "Only two placements are allowed.",
"TOO_MANY_MOVES_START": "At the start, only one placement is allowed."
},
"prudh": {
"INITIAL_INSTRUCTIONS": "Select a stack on a cell you control.",
"PARTIAL": "Select a destination.",
Expand Down
10 changes: 7 additions & 3 deletions src/games/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ import { BambooGame, IBambooState } from "./bamboo";
import { PluralityGame, IPluralityState } from "./plurality";
import { CrosshairsGame, ICrosshairsState } from "./crosshairs";
import { MagnateGame, IMagnateState } from "./magnate";
import { ProductGame, IProductState } from "./product";

export {
APGamesInformation, GameBase, GameBaseSimultaneous, IAPGameState,
Expand Down Expand Up @@ -457,6 +458,7 @@ export {
PluralityGame, IPluralityState,
CrosshairsGame, ICrosshairsState,
MagnateGame, IMagnateState,
ProductGame, IProductState,
};

const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof CannonGame |
Expand Down Expand Up @@ -536,7 +538,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
typeof RampartGame | typeof KrypteGame | typeof EnsoGame |
typeof RincalaGame | typeof WaldMeisterGame | typeof WunchunkGame |
typeof BambooGame | typeof PluralityGame | typeof CrosshairsGame |
typeof MagnateGame
typeof MagnateGame | typeof ProductGame
>();
// Manually add each game to the following array
[
Expand Down Expand Up @@ -571,7 +573,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
BloqueoGame, PilastriGame, TessellaGame, GorogoGame, BiscuitGame, QuincunxGame,
SiegeOfJGame, StairsGame, EmuGame, DeckfishGame, BluestoneGame, SunspotGame, StawvsGame,
LascaGame, EmergoGame, FroggerGame, ArimaaGame, RampartGame, KrypteGame, EnsoGame, RincalaGame,
WaldMeisterGame, WunchunkGame, BambooGame, PluralityGame, CrosshairsGame, MagnateGame,
WaldMeisterGame, WunchunkGame, BambooGame, PluralityGame, CrosshairsGame, MagnateGame, ProductGame
].forEach((g) => {
if (games.has(g.gameinfo.uid)) {
throw new Error("Another game with the UID '" + g.gameinfo.uid + "' has already been used. Duplicates are not allowed.");
Expand Down Expand Up @@ -1033,10 +1035,12 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
return new BambooGame(...args);
case "plurality":
return new PluralityGame(...args);
case "crosshairs":
case "crosshairs":
return new CrosshairsGame(...args);
case "magnate":
return new MagnateGame(...args);
case "product":
return new ProductGame(...args);
}
return;
}
Loading