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
12 changes: 12 additions & 0 deletions locales/en/apgames.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
"unlur": "An asymmetric connection game where one player tries to form a Y and the other tries to connect opposite sides. Achieving the opponent's goal without achieving your own is a loss. The game starts with a contract phase where both players place the colour of the Y player until someone passes, and then the opponent becomes the Line player.",
"upperhand": "A shedding game where you try to be the first to place all your pieces. If a platform is created and at least three of the pieces are of a player's colour, an additional piece of that colour is automatically placed on top of it, causing chain reactions. The pie rule applies.",
"urbino": "In Urbino, one manipulates architects (like in the game Fabrik) to build districts of different building types according to a handful of placement rules. When no more moves are possible, districts are scored, and the highest score wins. Also includes the \"Monuments\" variant.",
"unstack": "Sow your stacks to capture the adversary pieces, and be the one with more pieces at the end.",
"valley": "Get your king to the center space, but your pieces must always move as far as they can. Teamwork is essential.",
"veletas": "Drawless territory game where players control a number of neutral shooters and shoot stones of their own colour from them. In order to win, a player must claim a majority of neutral pieces by having them surrounded by larger groups of their own pieces than their opponent's.",
"verge": "Verge is a game where players attempt to create groups that partition the board, freezing those groups and removing enemy groups. The first player to have no legal placement wins.",
Expand Down Expand Up @@ -6878,6 +6879,17 @@
"PARTIAL_PLACE_SIZE": "Select the size of a piece to place.",
"VALID_MOVE": "Looks like a valid move. You can also click the cell again to select the next available piece size."
},
"unstack": {
"INSTRUCTIONS": "Select a friendly stack, click on it as many times as pieces to move, then click on a orthogonal path that starts adjacent to this sowing stack (one or more pieces per square), making 90º turns.",
"NOT_FRIENDLY_STACK": "Select a friendly stack to sow!",
"CAN_SOW": "It is only possible to pass when no legal sowing exists!",
"CAPTURES_MANDATORY": "Captures are available, and take precedence over non-captures! For example, {{from}} can capture {{to}}.",
"MULTIPLE_CAPTURES": "Only one capture per sowing is admissible!",
"INVALID_SOW_PATH": "The selected path does not follow Unstack rules: (a) pick (part of) a stack and leave one or more pieces per orthogonal adjacent intersection, (b) sowing can turn left/right after each placed piece, (c) sowing a stack is only legal if the player can legally place all pieces of the stack, (d) capturing enemy stacks is only legal if the number of pieces in-hand are at least as many as the size of that enemy stack.",
"SAME_PLACE_SOW_STACK": "The sowing stack cannot be the stack just created/enlarged.",
"SOW_INSTRUCTIONS": "Either select more pieces to sow, or start sowing with the ones already selected. When sowing, the next intersection must be adjacent to the previous one. Left and right turns are valid. Cannot sow over (and capture) opponent stacks with more than the size of the number of pieces that still need to be sowed.",
"SOW_TOO_LARGE": "The current sowing is larger than the available pieces at the sowing stack."
},
"valley": {
"BAD_VARIANT": "You can only move towers in the Moon Labyrinth variant.",
"INITIAL_INSTRUCTIONS": "Select a piece to move.",
Expand Down
2 changes: 1 addition & 1 deletion src/games/crosscontrol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface ICrossControlState extends IAPGameState {

export class CrossControlGame extends GameBase {
public static readonly gameinfo: APGamesInformation = {
name: "Cross Control",
name: "Crosscontrol",
uid: "crosscontrol",
playercounts: [2],
version: "20260613",
Expand Down
9 changes: 7 additions & 2 deletions src/games/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ import { FormsGame, IFormsState } from "./forms";
import { CompartGame, ICompartState } from "./compart";
import { AkimboGame, IAkimboState } from "./akimbo";
import { CrossControlGame, ICrossControlState } from "./crosscontrol";
import { UnstackGame, IUnstackState } from "./unstack";

export {
APGamesInformation, GameBase, GameBaseSimultaneous, IAPGameState,
Expand Down Expand Up @@ -533,6 +534,7 @@ export {
CompartGame, ICompartState,
AkimboGame, IAkimboState,
CrossControlGame, ICrossControlState,
UnstackGame, IUnstackState,
};

const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof CannonGame |
Expand Down Expand Up @@ -624,7 +626,8 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
typeof LinageGame | typeof PolluxGame | typeof PippinzipGame |
typeof NarrowsGame | typeof InvectorGame | typeof TricouleurGame |
typeof PositGame | typeof VirusWarGame | typeof FormsGame |
typeof CompartGame | typeof AkimboGame | typeof CrossControlGame
typeof CompartGame | typeof AkimboGame | typeof CrossControlGame |
typeof UnstackGame
>();
// Manually add each game to the following array
[
Expand Down Expand Up @@ -665,7 +668,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
SlimetrailGame, CatsDogsGame, SoccolotGame, CourtGame, HalmaGame, MinimizeGame, HalmaClimbersGame,
SynapseGame, AtariGoGame, TanboGame, UnaneGame, LinageGame, PolluxGame, PippinzipGame, NarrowsGame,
InvectorGame, TricouleurGame, PositGame, VirusWarGame, FormsGame, CompartGame, AkimboGame,
CrossControlGame
CrossControlGame, UnstackGame
].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 @@ -1207,6 +1210,8 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
return new AkimboGame(...args);
case "crosscontrol":
return new CrossControlGame(...args);
case "unstack":
return new UnstackGame(...args);
}
return;
}
Loading
Loading