Skip to content

Commit 3b2ed3c

Browse files
authored
Krypte (#293)
Krypte: Live testing
1 parent e67aedc commit 3b2ed3c

File tree

4 files changed

+674
-18
lines changed

4 files changed

+674
-18
lines changed

locales/en/apgames.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"jacynth": "A Decktet card game where opponents vye for control of the city of Jacynth. Place cards, exert influence, and control the most area to win.",
108108
"kachit": "A chess-like game played on a 4x4 board where you try to eliminate the opposing king or promote your own. Pieces can change their orientation after moving.",
109109
"konane": "A traditional Hawaiian game that was almost completely lost to time but for the memory of a single woman. Played on a square board, each player captures by jumping over their opponent's pieces. Last to move wins.",
110+
"krypte": "A 4-in-a-row game where pieces enter from active sides that rotate after each turn, and placing a piece flips all adjacent pieces.",
110111
"lasca": "A Draughts variant where captured pieces remain on the board and can be freed later. Immobilize your opponent to win.",
111112
"lielow": "A wartime tale of Machiavellian usurpership. You win if your piece lands on your opponent's king. You also win if your opponent chooses to move their king off the board.",
112113
"lifeline": "Conquer territory and capture enemy groups by cutting them off from all their allies. A group is cut off when it has no free path (straight or otherwise) to other groups of its color. Win by leaving your opponent with no moves.",
@@ -2869,6 +2870,20 @@
28692870
"name": "Hide restriction indicators"
28702871
}
28712872
},
2873+
"krypte": {
2874+
"moves_no_sides_yes": {
2875+
"description": "Don't show possible moves.",
2876+
"name": "Hide moves"
2877+
},
2878+
"moves_yes_sides_no": {
2879+
"description": "Don't show active sides.",
2880+
"name": "Hide sides"
2881+
},
2882+
"moves_no_sides_no": {
2883+
"description": "Show neither possible moves nor active sides.",
2884+
"name": "Hide both"
2885+
}
2886+
},
28722887
"lox": {
28732888
"hide-focus-threatened": {
28742889
"description": "Don't put additional highlight on pieces that are threatened to be captured.",
@@ -4400,6 +4415,12 @@
44004415
"NORMAL_MOVE": "Choose a piece to jump one or more of your opponent's pieces in a straight line.",
44014416
"INVALID_MOVE": "You must move a piece that can jump over an opponent's piece."
44024417
},
4418+
"krypte": {
4419+
"INITIAL_INSTRUCTIONS": "Enter a piece on the active side of the board",
4420+
"AMBIGUOUS": "Ambiguous moves, i.e. moves that could be entered from both active sides simultaneously, are forbidden.",
4421+
"SIMULTANEOUS": "Moves that would create winning lines for both players simultaneously are not allowed.",
4422+
"ACTIVE": "Pieces must be entered from one of the active sides of the board, sliding over existing pieces to the first empty square."
4423+
},
44034424
"lasca": {
44044425
"INITIAL_INSTRUCTIONS": "Select a stack with your piece on top to move.",
44054426
"INVALID_MOVE": "The move does not appear to be legal. Capturing is compulsory, and you must continue as long as further captures are possible.",

package-lock.json

Lines changed: 1 addition & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/games/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ import { EmergoGame, IEmergoState } from "./emergo";
218218
import { FroggerGame, IFroggerState } from "./frogger";
219219
import { ArimaaGame, IArimaaState } from "./arimaa";
220220
import { RampartGame, IRampartState } from "./rampart";
221+
import { KrypteGame, IKrypteState } from "./krypte";
221222
import { EnsoGame, IEnsoState } from "./enso";
222223

223224
export {
@@ -440,6 +441,7 @@ export {
440441
FroggerGame, IFroggerState,
441442
ArimaaGame, IArimaaState,
442443
RampartGame, IRampartState,
444+
KrypteGame, IKrypteState,
443445
EnsoGame, IEnsoState,
444446
};
445447

@@ -517,7 +519,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
517519
typeof EmuGame | typeof DeckfishGame | typeof BluestoneGame |
518520
typeof SunspotGame | typeof StawvsGame | typeof LascaGame |
519521
typeof EmergoGame | typeof FroggerGame | typeof ArimaaGame |
520-
typeof RampartGame | typeof EnsoGame
522+
typeof RampartGame | typeof KrypteGame | typeof EnsoGame
521523
>();
522524
// Manually add each game to the following array
523525
[
@@ -551,7 +553,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
551553
PonteDDGame, SurmountGame, GlissGame, MorphosGame, AssemblyGame, PaintbucketGame, C1Game,
552554
BloqueoGame, PilastriGame, TessellaGame, GorogoGame, BiscuitGame, QuincunxGame,
553555
SiegeOfJGame, StairsGame, EmuGame, DeckfishGame, BluestoneGame, SunspotGame, StawvsGame,
554-
LascaGame, EmergoGame, FroggerGame, ArimaaGame, RampartGame, EnsoGame,
556+
LascaGame, EmergoGame, FroggerGame, ArimaaGame, RampartGame, KrypteGame, EnsoGame,
555557
].forEach((g) => {
556558
if (games.has(g.gameinfo.uid)) {
557559
throw new Error("Another game with the UID '" + g.gameinfo.uid + "' has already been used. Duplicates are not allowed.");
@@ -999,6 +1001,8 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
9991001
return new ArimaaGame(...args);
10001002
case "rampart":
10011003
return new RampartGame(...args);
1004+
case "krypte":
1005+
return new KrypteGame(...args);
10021006
case "enso":
10031007
return new EnsoGame(...args);
10041008
}

0 commit comments

Comments
 (0)