Skip to content

Commit 0e4a25b

Browse files
authored
Merge pull request #382 from jpneto/develop
Added Tanbo
2 parents eae7b29 + abb71ea commit 0e4a25b

4 files changed

Lines changed: 465 additions & 2 deletions

File tree

locales/en/apgames.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
"tafl": "A collection of games from the Viking era. The defenders goal is to escape to the edge of the board, while the attackers try to capture the defender's king.",
225225
"taiji": "Two players take turns placing one piece of each colour next to each other. The winner is the one who forms the largest orthogonal groups of their own colour.",
226226
"take": "Grow root-like formations of stones from seeds. Plants die when they run out of room to grow. The winner is the last player with a plant alive on the board.",
227+
"tanbo": "Create space to grow your roots by bounding the opponent's.",
227228
"tbt": "A simple dice game where you attempt to form stacks of equal height on your home row.",
228229
"tessella": "Pieces capture in pairs using a \"shooting\" mechanic. Be the first to capture four of your opponent's pieces.",
229230
"tintas": "Players race to either collect all seven of one colour or to collect four of four different colours.",
@@ -1185,6 +1186,12 @@
11851186
"size-10": {
11861187
"name": "10x10 board"
11871188
},
1189+
"size-11": {
1190+
"name": "11x11 board"
1191+
},
1192+
"size-12": {
1193+
"name": "12x12 board"
1194+
},
11881195
"quelhas": {
11891196
"description": "Player can drop larger 1xN pieces. Misère game.",
11901197
"name": "Quelhas"
@@ -3018,6 +3025,20 @@
30183025
"name": "Small, High Churn"
30193026
}
30203027
},
3028+
"tanbo": {
3029+
"size-7": {
3030+
"name": "7x7 board"
3031+
},
3032+
"size-11": {
3033+
"name": "11x11 board"
3034+
},
3035+
"#board": {
3036+
"name": "15x15 board"
3037+
},
3038+
"size-19": {
3039+
"name": "19x19 board"
3040+
}
3041+
},
30213042
"terrace": {
30223043
"#board": {
30233044
"name": "6x6 board"
@@ -6313,6 +6334,10 @@
63136334
"take": {
63146335
"INITIAL_INSTRUCTIONS": "Plant a new seed in dirt, or grow a plant by placing adjacent to exactly one ally piece (dirt or no dirt)."
63156336
},
6337+
"tanbo": {
6338+
"INITIAL_INSTRUCTIONS": "Place a friendly piece on an empty cell adjacent to only one friendly stone. If that piece's groups becomes bounded (ie, cannot grow) it is capture. Otherwise, capture any bounded enemy group.",
6339+
"INVALID_MOVE": "The chosen cell must be orthogonally adjacent to just one friendly piece."
6340+
},
63166341
"tbt": {
63176342
"BAD_PASS": "You must move a stack if it's possible to do so.",
63186343
"INITIAL_INSTRUCTIONS": "Select a stack to move.",

src/games/domineering.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export class DomineeringGame extends GameBase {
5151
{ uid: "#board", }, // 8x8
5252
{ uid: "size-9", group: "board" },
5353
{ uid: "size-10", group: "board" },
54+
{ uid: "size-11", group: "board" },
55+
{ uid: "size-12", group: "board" },
5456
{ uid: "quelhas", group: "ruleset" },
5557
],
5658
flags: ["pie"],

src/games/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ import { MinimizeGame, IMinimizeState } from "./minimize";
251251
import { HalmaClimbersGame, IHalmaClimbersState } from "./halmaclimbers";
252252
import { SynapseGame, ISynapseState } from "./synapse";
253253
import { AtariGoGame, IAtariGoState } from "./atarigo";
254+
import { TanboGame, ITanboState } from "./tanbo";
254255

255256
export {
256257
APGamesInformation, GameBase, GameBaseSimultaneous, IAPGameState,
@@ -505,6 +506,7 @@ export {
505506
HalmaClimbersGame, IHalmaClimbersState,
506507
SynapseGame, ISynapseState,
507508
AtariGoGame, IAtariGoState,
509+
TanboGame, ITanboState,
508510
};
509511

510512
const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof CannonGame |
@@ -592,7 +594,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
592594
typeof ShapeChessGame | typeof SlimetrailGame | typeof CatsDogsGame |
593595
typeof SoccolotGame | typeof CourtGame | typeof HalmaGame |
594596
typeof MinimizeGame | typeof HalmaClimbersGame | typeof SynapseGame |
595-
typeof AtariGoGame
597+
typeof AtariGoGame | typeof TanboGame
596598
>();
597599
// Manually add each game to the following array
598600
[
@@ -631,7 +633,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
631633
ProductGame, OonpiaGame, GoGame, StilettoGame, BTTGame, MinefieldGame, SentinelGame,
632634
XanaGame, SporaGame, SquirmGame, PinchGame, DomineeringGame, TwinFlamesGame, YGame, ShapeChessGame,
633635
SlimetrailGame, CatsDogsGame, SoccolotGame, CourtGame, HalmaGame, MinimizeGame, HalmaClimbersGame,
634-
SynapseGame, AtariGoGame,
636+
SynapseGame, AtariGoGame, TanboGame
635637
].forEach((g) => {
636638
if (games.has(g.gameinfo.uid)) {
637639
throw new Error("Another game with the UID '" + g.gameinfo.uid + "' has already been used. Duplicates are not allowed.");
@@ -1145,6 +1147,8 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
11451147
return new SynapseGame(...args);
11461148
case "atarigo":
11471149
return new AtariGoGame(...args);
1150+
case "tanbo":
1151+
return new TanboGame(...args);
11481152
}
11491153
return;
11501154
}

0 commit comments

Comments
 (0)