Skip to content

Commit 7566499

Browse files
committed
Moon squad ready for live testing
1 parent 6df07ab commit 7566499

File tree

6 files changed

+1155
-3
lines changed

6 files changed

+1155
-3
lines changed

locales/en/apgames.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
"mixtour": "Two players create towers with the goal of creating a tower at least five high with your colour at the top. The twist here is two-fold: (1) you can move opponent's pieces and (2) movement range is determined by the *target* stack height and not the moving stack height.",
9898
"monkey": "You start with a single queen, composed of a stack of checkers. When you make noncapturing moves, the queen leaves a singleton behind. Queens and singletons move and capture like chess queens. To win, capture the opposing queen or leave them with no legal moves.",
9999
"murus": "Murus Gallicus is a two-player breakthrough game in which players try to create impenetrable walls of stone as menacing formations approach, reminiscent of Julius Caesar's Gallic Wars.",
100+
"moonsquad": "Your mining company has found rich ore on this small moon, but you need buyers. Connect your mine to all 3 surface settlements, and hire squads to defend your mine and attack your rival.",
100101
"mvolcano": "An Icehouse puzzle game for 2 players. Stacks of pyramids are volcanos, some of which are capped. As you move caps around, you cause eruptions that may lead to you capturing pieces. This is an older version of the game. It is played on a 6x6 board, and the game ends as soon as someone captures at least one piece of each colour or all three white pieces. Scores are then calculated. Highest score wins.",
101102
"necklace": "An orthogonal-only square connection game where you try to connect your sides of the board. Crosscut formations are illegal, and every free space must always have a path to an edge.",
102103
"nex": "Nex (or Neutral Hex) is a variant of the Hex connection game where there are neutral pieces. On your turn, you may either (1) place a piece of your colour and a neutral colour on an empty space, or (2) swap two neutral pieces to your colour and one of your piece to the neutral colour.",
@@ -935,6 +936,16 @@
935936
"name": "Best of Three"
936937
}
937938
},
939+
"moonsquad": {
940+
"hex5": {
941+
"name": "Hexhex 5 (61 spaces)",
942+
"description": "In this version, the pie offer is a single piece."
943+
},
944+
"limping": {
945+
"name": "Limping 5-6 (75 spaces)",
946+
"description": "Two colours will have an extra cube."
947+
}
948+
},
938949
"murus": {
939950
"basic": {
940951
"description": "Only walls and towers can be built (maximum stack size is 2).",
@@ -1847,6 +1858,12 @@
18471858
"name": "board (base 7)"
18481859
}
18491860
},
1861+
"moonsquad": {
1862+
"board": {
1863+
"name": "moon board",
1864+
"description": "A hexhex5 board with a subdivided centre cell and tweaked edges to form a moon-type surface."
1865+
}
1866+
},
18501867
"nex": {
18511868
"board": {
18521869
"name": "11x11 board"
@@ -3562,6 +3579,25 @@
35623579
"PARTIAL": "Select a destination.",
35633580
"QUEEN_DEPLETED": "Your queen can no longer make noncapturing moves."
35643581
},
3582+
"moonsquad": {
3583+
"BAD_CAPTURE": "You may only capture opposing pieces and squads.",
3584+
"BAD_MOVE_double": "You already have a squad at {{to}}.",
3585+
"BAD_MOVE_group": "You can't move from {{from}} to {{to}}. The squad must stay within the same connected group.",
3586+
"BAD_MOVE_stationary": "You can't move from a space to the same space.",
3587+
"BAD_PLACEMENT": "You can't place a piece at {{where}}. It must contain an ore cube.",
3588+
"INITIAL_INSTRUCTIONS_hexoffer": "On the first move of the game, place a single piece and then the opponent will choose sides. Click an empty space to place the piece.",
3589+
"INITIAL_INSTRUCTIONS_offer": "On the first move of the game, place two red pieces and one blue piece. Click an empty space to place the first red piece.",
3590+
"INITIAL_INSTRUCTIONS_pie": "On the second move of the game, either click the Switch Seats button to play as red, or make a normal move as blue. If your opponent already switched seats, then your only choice is to make a normal move.",
3591+
"INITIAL_INSTRUCTIONS_normal": "Click an ore cube to place one of your pieces. Click one of your squads to start a capture. Or click a cube in your supply to move your squads.",
3592+
"INVALID_ORE": "The code {{ore}} is not a valid ore type.",
3593+
"MISSING_ORE": "Could not find any {{ore}} ore in your supply.",
3594+
"MISSING_SQUAD": "Could not find a squad at {{where}}.",
3595+
"PARTIAL_CAPTURE": "Select the opposing piece to capture.",
3596+
"PARTIAL_MOVE_first": "Select a squad to move. You must move at least one squad.",
3597+
"PARTIAL_MOVE_second": "Select a destination. The squad must stay in the same connected group.",
3598+
"PARTIAL_PLACE1": "On the first move of the game, place two red pieces and one blue piece. Click an empty space to place the second red piece.",
3599+
"PARTIAL_PLACE2": "On the first move of the game, place two red pieces and one blue piece. Click an empty space to place the blue piece."
3600+
},
35653601
"murus": {
35663602
"BAD_CAP": "Adjacent pieces may only be captured by towers, and only walls and catapults can be captured in this way.",
35673603
"BAD_CATA_DIR": "Catapults may only fire laterally or towards the opposing home row.",

locales/en/apresults.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120
"CLAIM_TOGUZ": "Pit {{pit}} became a tuz.",
121121
"CONVERT": {
122122
"complete": "{{player}} turned a {{what}} into a {{into}} at {{where}}.",
123-
"courtesan": "King and courtesan swapped positions at {{where}}."
123+
"courtesan": "King and courtesan swapped positions at {{where}}.",
124+
"moonsquad": "{{player}} recruited a squad."
124125
},
125126
"DAMAGE": {
126127
"armadas": "{{player}}'s ship {{myName}} fired upon the enemy ship named {{theirName}}.",
@@ -305,6 +306,7 @@
305306
"logger_spawn": "A new sapling sprouted at {{where}}.",
306307
"mattock": "{{player}} placed a miner at {{where}}.",
307308
"mine": "{{player}} placed one of their own pieces at {{where}}.",
309+
"moonsquad": "{{player}} placed a squad at {{where}}.",
308310
"neutral": "A neutral piece was placed at {{where}}.",
309311
"nex": "{{player}} placed a piece of their colour at {{where}}.",
310312
"nex_neutral": "{{player}} placed a neutral piece at {{where}}.",
@@ -404,6 +406,9 @@
404406
"single": "The die was rolled: {{values}}.",
405407
"tablero": "The dice were rolled: {{values}}."
406408
},
409+
"SACRIFICE": {
410+
"moonsquad": "{{player}} sacrificed an ore ({{ore}}) to move their squads."
411+
},
407412
"SCORE_REPORT": "{{player}}'s score is now {{score}}.",
408413
"SELECT": {
409414
"fnap": "{{player}} selected the tile {{tile}}.",
@@ -439,6 +444,7 @@
439444
"buku_col_one": "{{player}} collected 1 piece from column {{col}}.",
440445
"buku_col_other": "{{player}} collected {{count}} pieces from column {{col}}.",
441446
"chase": "A {{what}} was fed to the chamber.",
447+
"moonsquad": "{{player}} took an ore ({{ore}}).",
442448
"sploof": "{{player}} took a neutral ball at {{from}}.",
443449
"streetcar": "{{player}} took a housing limit from {{from}}.",
444450
"streetcar_1": "{{player}} took an ORANGE housing limit from {{from}}.",

src/common/graphs/IGraph.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
import { DirectedGraph, UndirectedGraph } from "graphology";
2+
13
export interface IGraph {
4+
graph: DirectedGraph|UndirectedGraph;
25
coords2algebraic(x: number, y: number): string;
36
algebraic2coords(cell: string): [number, number];
47
listCells(ordered?: boolean): string[] | string[][];

src/games/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ import { FramesGame, IFramesState } from "./frames";
165165
import { LoggerGame, ILoggerState } from "./logger";
166166
import { SubdivisionGame, ISubdivisionState } from "./subdivision";
167167
import { PylonGame, IPylonState } from "./pylon";
168+
import { MoonSquadGame, IMoonSquadState } from "./moonsquad";
168169

169170
export {
170171
APGamesInformation, GameBase, GameBaseSimultaneous, IAPGameState,
@@ -332,6 +333,7 @@ export {
332333
LoggerGame, ILoggerState,
333334
SubdivisionGame, ISubdivisionState,
334335
PylonGame, IPylonState,
336+
MoonSquadGame, IMoonSquadState,
335337
};
336338

337339
const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof CannonGame |
@@ -389,7 +391,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
389391
typeof ResolveGame | typeof OnyxGame | typeof AltaGame |
390392
typeof HulaGame | typeof KonaneGame | typeof BlastRadiusGame |
391393
typeof FramesGame | typeof LoggerGame | typeof SubdivisionGame |
392-
typeof PylonGame
394+
typeof PylonGame | typeof MoonSquadGame
393395
>();
394396
// Manually add each game to the following array
395397
[
@@ -416,6 +418,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
416418
MajoritiesGame, BukuGame, TritiumGame, CamelotGame, LifelineGame, ShiftyGame, PodsGame, LoxGame,
417419
QueryGame, ControlGame, BoxesGame, ConnectionsGame, ResolveGame, OnyxGame, AltaGame,
418420
HulaGame, KonaneGame, BlastRadiusGame, FramesGame, LoggerGame, SubdivisionGame, PylonGame,
421+
MoonSquadGame,
419422
].forEach((g) => {
420423
if (games.has(g.gameinfo.uid)) {
421424
throw new Error("Another game with the UID '" + g.gameinfo.uid + "' has already been used. Duplicates are not allowed.");
@@ -755,6 +758,8 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
755758
return new SubdivisionGame(args[0], ...args.slice(1));
756759
case "pylon":
757760
return new PylonGame(...args);
761+
case "moonsquad":
762+
return new MoonSquadGame(...args);
758763
}
759764
return;
760765
}

0 commit comments

Comments
 (0)