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
51 changes: 51 additions & 0 deletions locales/en/apgames.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
"omny": "Generalized connection game where players try to split star cells into different regions so that no single region contains a majority of star cells.",
"onager": "In Onager each player tries to reach the opponent's back rank. Onager is named after a Roman siege engine that is a type of catapult, as the way the pieces move resembles how projectiles are hurled forward with this device.",
"onyx": "A connection game on a modified snub-square board with a capture rule.",
"oonpia": "A hexagonal go-like where pieces come in two types. Only pieces of opposite type are connected, and a 4-arc of pieces of the same type (regardless of colour) is forbidden.",
"orb": "Generatorb is 2-player game played on a standard chess board. Players start in opposite corners and attempt to reach their opponent's generator core or occupy the majority of cells on the front line. During play, you can stack up to three checkers in a space. Stacks of different heights behave differently, leading to engaging strategic options.",
"ordo": "Ordo is a \"get to your opponent's home row\" game in which you must always keep your pieces connected. Pieces can move singly and also as a group in certain situations. You can also win by breaking up your opponent's group in such a way that they can't reconnect it.",
"oust": "Oust is the classic \"exnihilation\" game where the game starts with an empty board and the goal is to eliminate all of your opponent's pieces. On your turn, you may make multiple capturing placements if available, but you must end it with a non-capturing placement. You must pass if you are not able to make any placements.",
Expand Down Expand Up @@ -1787,6 +1788,32 @@
"description": "Both players start with two pieces on each opponent's edge."
}
},
"oonpia": {
"size-5": {
"name": "Size 5 board"
},
"#board": {
"name": "Size 6 board"
},
"size-7": {
"name": "Size 7 board"
},
"size-8": {
"name": "Size 8 board"
},
"size-9": {
"name": "Size 9 board"
},
"size-10": {
"name": "Size 10 board"
},
"size-11": {
"name": "Size 11 board"
},
"size-12": {
"name": "Size 12 board"
}
},
"orb": {
"noglobes": {
"description": "Neither player starts with any globes.",
Expand Down Expand Up @@ -3070,6 +3097,20 @@
"name": "Hide threatened"
}
},
"oonpia": {
"palette_no_blocked_no": {
"description": "Black/white/blue colours, don't highlight blocked cells",
"name": "palette_no_blocked_no"
},
"palette_yes_blocked_yes": {
"description": "Palette colours, highlight blocked cells.",
"name": "palette_yes_blocked_yes"
},
"palette_yes_blocked_no": {
"description": "Palette colours, don't highlight blocked cells.",
"name": "palette_yes_blocked_no"
}
},
"oust": {
"hide-moves": {
"description": "Don't show possible moves.",
Expand Down Expand Up @@ -4919,6 +4960,16 @@
"SINGLE_CAPTURE": "This move captures one pair, it has to be suffixed with 'x'. Try '{{move}}'.",
"DOUBLE_CAPTURE": "This move captures two pairs, it has to be suffixed with 'xx'. Try '{{move}}'."
},
"oonpia": {
"DESTINATION": "Select a cell to place the piece.",
"INITIAL_INSTRUCTIONS": "Place a piece of either type on an empty space, or pass to take an enemy piece out of the prison instead (if one is available). Either select a piece from the legend, or click on the board to cycle through the available pieces.",
"INITIAL_INSTRUCTIONS_komi": "Komi pie offer: enter the number of pieces to place in the prison as a compensation for not playing the first stone. The other player will then decide which seat to take.",
"ARC": "You may not form a size 4 arc of stones of one type, regardless of colour.",
"INVALID_CAPTURE": "A blue stone must always capture some enemy or friendly stones.",
"INVALID_PLACE": "Placing a stone of your own colour may not capture any stones.",
"INVALID_BOTH": "Neither a placement nor a capture is possible at {{where}}.",
"BAD_KOMI": "The first move of the game must be a non-negative integer representing the number of pieces to place in the starting prison."
},
"orb": {
"INITIAL_INSTRUCTIONS": "Select one of your own pieces to move.",
"SEED_PARTIAL": "Select a destination.",
Expand Down
25 changes: 5 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"dependencies": {
"@abstractplay/recranks": "latest",
"@abstractplay/renderer": "^1.0.0-ci-21051058249.0",
"@abstractplay/renderer": "^1.0.0-ci-22152124889.0",
"@turf/boolean-contains": "^6.5.0",
"@turf/boolean-intersects": "^6.5.0",
"@turf/boolean-point-in-polygon": "^6.5.0",
Expand Down
2 changes: 1 addition & 1 deletion playground/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>AP Game Tester</title>
<script src="https://renderer.dev.abstractplay.com/APRender.min.js"></script>
<script src="./APRender.js"></script>
<script src="./APGames.js"></script>
<script src=" https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mini.css/3.0.1/mini-default.min.css">
Expand Down
9 changes: 7 additions & 2 deletions src/games/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ import { SunspotGame, ISunspotState } from "./sunspot";
import { StawvsGame, IStawvsState } from "./stawvs";
import { LascaGame, ILascaState } from "./lasca";
import { EmergoGame, IEmergoState } from "./emergo";
import { OonpiaGame, IOonpiaState } from "./oonpia";
import { FroggerGame, IFroggerState } from "./frogger";
import { ArimaaGame, IArimaaState } from "./arimaa";
import { RampartGame, IRampartState } from "./rampart";
Expand Down Expand Up @@ -446,6 +447,7 @@ export {
StawvsGame, IStawvsState,
LascaGame, ILascaState,
EmergoGame, IEmergoState,
OonpiaGame, IOonpiaState,
FroggerGame, IFroggerState,
ArimaaGame, IArimaaState,
RampartGame, IRampartState,
Expand Down Expand Up @@ -538,7 +540,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 ProductGame
typeof MagnateGame | typeof ProductGame | typeof OonpiaGame
>();
// Manually add each game to the following array
[
Expand Down Expand Up @@ -573,7 +575,8 @@ 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, ProductGame
WaldMeisterGame, WunchunkGame, BambooGame, PluralityGame, CrosshairsGame, MagnateGame, ProductGame,
OonpiaGame
].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 @@ -1015,6 +1018,8 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
return new LascaGame(...args);
case "emergo":
return new EmergoGame(...args);
case "oonpia":
return new OonpiaGame(...args);
case "frogger":
return new FroggerGame(args[0], ...args.slice(1));
case "arimaa":
Expand Down
Loading