Skip to content

Commit

Permalink
Omny: Live testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Feb 3, 2025
1 parent 0bf6119 commit 5ad4a95
Show file tree
Hide file tree
Showing 3 changed files with 780 additions and 2 deletions.
12 changes: 12 additions & 0 deletions locales/en/apgames.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"nakatta": "A square connection game where two specific piece configurations are forbidden.",
"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.",
"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.",
"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.",
"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.",
Expand Down Expand Up @@ -4006,6 +4007,17 @@
"SWAP_TOO_MANY_PLAYER": "You may only swap one of your pieces to the neutral colour.",
"SWAP_UNCONTROLLED": "You many not swap your opponent's pieces."
},
"omny": {
"ADJACENCY": "Pieces may only move to adjacent cells.",
"BAD_MOVE": "You may only move pieces if captures are active.",
"EMPTY_MOVE": "Pieces may only move onto occupied cells.",
"FRIENDLY_CAPTURE": "You may not cover your own stacks.",
"INITIAL_INSTRUCTIONS": "Select an empty cell to place a piece of your colour.",
"NO_DUPES": "Your move may not include duplicate cells.",
"PARTIAL_MOVE": "Select the destination.",
"PARTIAL_SETUP": "Select a cell to place a star point (you must place at least one), or select a star point you placed to remove it. Click \"Complete move\" when you're done.",
"SAME_HEIGHT":"Pieces may only move between stacks of the same height."
},
"onager": {
"CENTRE_PLACEMENT": "The lake cannot be placed at the centre cell, {{where}}.",
"INITIAL_INSTRUCTIONS": "Select one of your pieces to walk or jump.",
Expand Down
9 changes: 7 additions & 2 deletions src/games/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ import { KachitGame, IKachitState } from "./kachit";
import { GyveGame, IGyveState } from "./gyve";
import { PahTumGame, IPahTumState } from "./pahtum";
import { NakattaGame, INakattaState } from "./nakatta";
import { OmnyGame, IOmnyState } from "./omny";

export {
APGamesInformation, GameBase, GameBaseSimultaneous, IAPGameState,
Expand Down Expand Up @@ -378,6 +379,7 @@ export {
GyveGame, IGyveState,
PahTumGame, IPahTumState,
NakattaGame, INakattaState,
OmnyGame, IOmnyState,
};

const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof CannonGame |
Expand Down Expand Up @@ -442,7 +444,8 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
typeof BasaltGame | typeof ChurnGame | typeof PenguinGame |
typeof OwlmanGame | typeof SquaredanceGame | typeof MegGame |
typeof YonmoqueGame | typeof ChameleonGame | typeof KachitGame |
typeof GyveGame | typeof PahTumGame | typeof NakattaGame
typeof GyveGame | typeof PahTumGame | typeof NakattaGame |
typeof OmnyGame
>();
// Manually add each game to the following array
[
Expand Down Expand Up @@ -472,7 +475,7 @@ const games = new Map<string, typeof AmazonsGame | typeof BlamGame | typeof Cann
MoonSquadGame, JacynthGame, Pigs2Game, TerraceGame, CubeoGame, StorisendeGame, TraxGame,
AmoebaGame, YavalathGame, ConspirateursGame, CatapultGame, BasaltGame, ChurnGame, PenguinGame,
OwlmanGame, SquaredanceGame, MegGame, YonmoqueGame, ChameleonGame, KachitGame, GyveGame,
PahTumGame, NakattaGame,
PahTumGame, NakattaGame, OmnyGame,
].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 @@ -858,6 +861,8 @@ export const GameFactory = (game: string, ...args: any[]): GameBase|GameBaseSimu
return new PahTumGame(...args);
case "nakatta":
return new NakattaGame(...args);
case "omny":
return new OmnyGame(...args);
}
return;
}
Loading

0 comments on commit 5ad4a95

Please sign in to comment.