width: 20%
padding-bottom: 20%
+div.board7
+ width: 14.28%
+ padding-bottom: 14.28%
+
div.board8
width: 12.5%
padding-bottom: 12.5%
"Unidentified pieces": "Unidentified pieces",
"Walk on a graph": "Walk on a graph",
"White move twice": "White move twice",
- "Win by castling long": "Win by castling long"
+ "Win by castling long": "Win by castling long",
+ "Xiangqi 7 x 7": "Xiangqi 7 x 7"
};
"Unidentified pieces": "Piezas no identificadas",
"Walk on a graph": "Camino en un gráfico",
"White move twice": "Las blancas juegan dos veces",
- "Win by castling long": "Ganar jugando al enroque largo"
+ "Win by castling long": "Ganar jugando al enroque largo",
+ "Xiangqi 7 x 7": "Xiangqi 7 x 7"
};
"Unidentified pieces": "Pièces non identifiées",
"Walk on a graph": "Marche sur un graphe",
"White move twice": "Les blancs jouent deux fois",
- "Win by castling long": "Gagnez en jouant grand roque"
+ "Win by castling long": "Gagnez en jouant grand roque",
+ "Xiangqi 7 x 7": "Xiangqi 7 x 7"
};
figcaption Initial position.
p.
- Minishogi is essentially shogi on a 5x5 board. The game was invented
+ Minishogi is essentially Shogi on a 5x5 board. The game was invented
(or rediscovered) around 1970 by Shigenobu Kusumoto of Osaka, Japan.
p
| The rules are the same as in
a(href="/#/variants/Shogi") Shogi
- | . Unlike standard shogi, there is no knight or lance.
+ | . Unlike standard Shogi, there is no knight or lance.
| Promotion is only done in the last rank.
p
d'Osaka, Japon.
p
- | les règles sont les mêmes qu'au
+ | Les règles sont les mêmes qu'au
a(href="/#/variants/Shogi") Shogi
| . Contrairement au Shogi standard, il n'y a ni lance ni cavalier.
- | Les promotion ne s'effectuent que sur la dernière rangée.
+ | Les promotions ne s'effectuent que sur la dernière rangée.
p
| Voir aussi
--- /dev/null
+p.boxed Xiangqi on a 7 x 7 board.
+
+figure.diagram-container
+ .diagram
+ | fen:rcnkncr/p1ppp1p/7/7/7/P1PPP1P/RCNKNCR:
+ figcaption Initial position.
+
+p.
+ Minixiangqi is essentially Xiangqi on a 7x7 board. The game was invented
+ (or rediscovered) around 1973 by Shigenobu Kusumoto of Osaka, Japan.
+
+p
+ | The rules are the same as in
+ a(href="/#/variants/Xiangqi") Xiangqi
+ | . Unlike standard Xiangqi, there is no elephant or advisor.
+ | Pawns always have the ability to move sideways.
+
+p
+ | See also
+ a(href="https://www.pychess.org/variant/minixiangqi") Minixiangqi
+ | on pychess-variants.
--- /dev/null
+p.boxed Xiangqi en un tablero 7 x 7.
+
+figure.diagram-container
+ .diagram
+ | fen:rcnkncr/p1ppp1p/7/7/7/P1PPP1P/RCNKNCR:
+ figcaption Posición inicial.
+
+p.
+ Esta variante corresponde al Xiangqi en un tablero de ajedrez de 7x7.
+ Este juego fue inventado (o redescubierto) en 1973 por Shigenobu Kusumoto
+ de Osaka, Japón.
+
+p
+ | Las reglas son las mismas que en
+ a(href="/#/variants/Xiangqi") Xiangqi
+ | . A diferencia del Xiangqi estándar, no hay elefante ni consejero.
+ | Los peones siempre tienen la opción de moverse hacia los lados.
+
+p
+ | Ver también
+ a(href="https://www.pychess.org/variant/minixiangqi") Minixiangqi
+ | & nbsp;en pychess-variants.
--- /dev/null
+p.boxed Xiangqi sur un plateau 7 x 7.
+
+figure.diagram-container
+ .diagram
+ | fen:rcnkncr/p1ppp1p/7/7/7/P1PPP1P/RCNKNCR:
+ figcaption Position initiale.
+
+p.
+ Cette variante correspond au Xiangqi sur un échiquier 7x7.
+ Ce jeu a été inventé (ou redécouvert) en 1973 par Shigenobu Kusumoto
+ d'Osaka, Japon.
+
+p
+ | Les règles sont les mêmes qu'au
+ a(href="/#/variants/Xiangqi") Xiangqi
+ | . Contrairement au Xiangqi standard, il n'y a ni éléphant ni conseiller.
+ | Les pions ont toujours l'option de se déplacer létaralement.
+
+p
+ | Voir aussi
+ a(href="https://www.pychess.org/variant/minixiangqi") Minixiangqi
+ | sur pychess-variants.
import { ChessRules, PiPo, Move } from "@/base_rules";
-import { ShogiRules } from "@/variants/Shogi";
+import { ShogiRules } from "@/variants/Shogi"
export class MinishogiRules extends ShogiRules {
--- /dev/null
+import { ChessRules, PiPo, Move } from "@/base_rules";
+import { XiangqiRules } from "@/variants/Xiangqi"
+
+export class MinixiangqiRules extends XiangqiRules {
+
+ static get Lines() {
+ let lines = [];
+ // Draw all inter-squares lines, shifted:
+ for (let i = 0; i < V.size.x; i++)
+ lines.push([[i+0.5, 0.5], [i+0.5, V.size.y-0.5]]);
+ for (let j = 0; j < V.size.y; j++)
+ lines.push([[0.5, j+0.5], [V.size.x-0.5, j+0.5]]);
+ // Add palaces:
+ lines.push([[0.5, 2.5], [2.5, 4.5]]);
+ lines.push([[0.5, 4.5], [2.5, 2.5]]);
+ lines.push([[4.5, 2.5], [6.5, 4.5]]);
+ lines.push([[4.5, 4.5], [6.5, 2.5]]);
+ return lines;
+ }
+
+ // No elephants or advisors
+ static get PIECES() {
+ return [V.PAWN, V.ROOK, V.KNIGHT, V.KING, V.CANNON];
+ }
+
+ getPpath(b) {
+ return "Xiangqi/" + b;
+ }
+
+ static get size() {
+ return { x: 7, y: 7};
+ }
+
+ getPotentialMovesFrom(sq) {
+ switch (this.getPiece(sq[0], sq[1])) {
+ case V.PAWN: return this.getPotentialPawnMoves(sq);
+ case V.ROOK: return super.getPotentialRookMoves(sq);
+ case V.KNIGHT: return super.getPotentialKnightMoves(sq);
+ case V.KING: return super.getPotentialKingMoves(sq);
+ case V.CANNON: return super.getPotentialCannonMoves(sq);
+ }
+ return []; //never reached
+ }
+
+ getPotentialPawnMoves([x, y]) {
+ const c = this.getColor(x, y);
+ const shiftX = (c == 'w' ? -1 : 1);
+ const lastRank = (c == 'w' && x == 0 || c == 'b' && x == 6);
+ let steps = [];
+ if (!lastRank) steps.push([shiftX, 0]);
+ if (y > 0) steps.push([0, -1]);
+ if (y < 9) steps.push([0, 1]);
+ return super.getSlideNJumpMoves([x, y], steps, "oneStep");
+ }
+
+ insidePalace(x, y, c) {
+ return (
+ (y >= 2 && y <= 4) &&
+ (
+ (c == 'w' && x >= 4) ||
+ (c == 'b' && x <= 2)
+ )
+ );
+ }
+
+ static get VALUES() {
+ return {
+ p: 2,
+ r: 9,
+ n: 4,
+ c: 4.5,
+ k: 1000
+ };
+ }
+
+ // Back to ChessRules method:
+ evalPosition() {
+ let evaluation = 0;
+ for (let i = 0; i < V.size.x; i++) {
+ for (let j = 0; j < V.size.y; j++) {
+ if (this.board[i][j] != V.EMPTY)
+ evaluation += (c == 'w' ? 1 : -1) * V.VALUES[this.getPiece(i, j)];
+ }
+ }
+ return evaluation;
+ }
+
+ // Also no randomization here
+ static GenRandInitFen() {
+ return "rcnkncr/p1ppp1p/7/7/7/P1PPP1P/RCNKNCR w 0";
+ }
+
+};
('Makruk', 'Thai Chess'),
('Maxima', 'Occupy the enemy palace'),
('Minishogi', 'Shogi 5 x 5'),
+ ('Minixiangqi', 'Xiangqi 7 x 7'),
('Monochrome', 'All of the same color'),
('Monster', 'White move twice'),
('Omega', 'A wizard in the corner'),