--- /dev/null
+../Omega/bc.svg
\ No newline at end of file
--- /dev/null
+../Maxima/bg.svg
\ No newline at end of file
--- /dev/null
+../Omega/bw.svg
\ No newline at end of file
--- /dev/null
+../Omega/wc.svg
\ No newline at end of file
--- /dev/null
+../Maxima/wg.svg
\ No newline at end of file
--- /dev/null
+../Omega/ww.svg
\ No newline at end of file
"Shogi 5 x 5": "Shogi 5 x 5",
"Shoot pieces": "Shoot pieces",
"Spartan versus Persians": "Spartan versus Persians",
- "Squares disappear": "Squares disappear",
+ "Squares disappear (v1)": "Squares disappear (v1)",
+ "Squares disappear (v2)": "Squares disappear (v2)",
"Squat last rank (v1)": "Squat last rank (v1)",
"Squat last rank (v2)": "Squat last rank (v2)",
"Stacking Checkers variant": "Stacking Checkers variant",
a(href="https://www.chessvariants.com/mvopponent.dir/avalanche.html")
| Avalanche Chess
| on chessvariants.com.
+
+p Inventor: Ralph Betza (1977)
a(href="https://www.chessvariants.com/mvopponent.dir/avalanche.html")
| Avalanche Chess
| en chessvariants.com.
+
+p Inventor: Ralph Betza (1977)
a(href="https://www.chessvariants.com/mvopponent.dir/avalanche.html")
| Avalanche Chess
| sur chessvariants.com.
+
+p Inventeur : Ralph Betza (1977)
a(href="https://www.chessvariants.com/difftaking.dir/brotherhood.html")
| Brotherhood Chess
| on chessvariants.com.
+
+p Inventor: Gianluca Vecchi (1993)
a(href="https://www.chessvariants.com/difftaking.dir/brotherhood.html")
| Brotherhood Chess
| en chessvariants.com.
+
+p Inventor: Gianluca Vecchi (1993)
a(href="https://www.chessvariants.com/difftaking.dir/brotherhood.html")
| Brotherhood Chess
| sur chessvariants.com.
+
+p Inventeur : Gianluca Vecchi (1993)
a(href="https://www.chessvariants.com/rules/strate-go-chess") Strate-Go chess
| on chessvariants.com.
-p Inventor: John Lewis (2005)
+p Inventor: John Kipling Lewis (2005)
| variante Strate-Go
| en chessvariants.com.
-p Inventor: John Lewis (2005)
+p Inventor: John Kipling Lewis (2005)
| variante Strate-Go
| sur chessvariants.com.
-p Inventeur : John Lewis (2005)
+p Inventeur : John Kipling Lewis (2005)
a(href="/#/variants/Pawns") Pawns
| Game. A king is added to its starting square. He moves as usual.
| The first person to reach the other side with a pawn or king is the winner.
- | You can also win if you capture the enemy king.
+ | You can also win by capturing the enemy king.
h3 Source
| Wildebeest page
| on chessvariants.com.
-p Inventor: R. Wayne Schmittberger (1992)
+p Inventor: R. Wayne Schmittberger (1987)
| Variante Wildebeest
| en chessvariants.com.
-p Inventor: R. Wayne Schmittberger (1992)
+p Inventor: R. Wayne Schmittberger (1987)
| variante Wildebeest
| sur chessvariants.com.
-p Inventeur : R. Wayne Schmittberger (1992)
+p Inventeur : R. Wayne Schmittberger (1987)
figure.diagram-container
.diagram
- | fen:rbkxxxbn/ppxppppx/2qxxB2/4x2p/3P1x2/3n1x2/PPPxPPPP/RBxxxNKR b2,f2,b4,c5,g5,f6:
+ | fen:cwkxxxwn/ppxppppx/2mxxW2/4x2p/3P1x2/3n1x2/PPPxPPPP/CWxxxNKC b2,f2,b4,c5,g5,f6:
figcaption Possible moves for the knight on d3.
p.
h3 Pieces movements
+p Three new pieces replace usual sliders:
+
+figure.showPieces.text-center
+ img(src="/images/pieces/Wormhole/wc.png" style="width:60px")
+ img(src="/images/pieces/Wormhole/ww.png" style="width:60px")
+ img(src="/images/pieces/Wormhole/wm.png" style="width:60px")
+ figcaption Left to right: Champion, Wizard, Murray Lion.
+
ul
- li The rook moves one or two squares vertically or horizontally.
- li The bishop moves one or two squares diagonally.
- li The queen moves either like a rook or like a bishop.
+ li.
+ The champion moves two squares in any direction,
+ or one square orthogonally.
+ li.
+ The wizard moves like an extended knight: two squares in an orthogonal
+ direction, and then one diagonal step. Or, a single diagonal step.
+ li.
+ The Murray Lion can move two squares in any direction.
+ He can also capture (only) by one square like a king.
li The other pieces move like in orthodox chess.
p All pieces can jump over others when moving by two squares.
a(href="https://www.chessvariants.com/32turn.dir/wormhole.html")
| Wormhole chess
| on chessvariants.com.
- | I changed the pieces movements because I have a better feeling with the
- | moves described earlier. It might evolve.
p
- | Inventor (with other pieces' movements): Fergus Duniho (2000).
+ | Inventor: Fergus Duniho (2000).
| Similar to
a(href="https://www.chessvariants.com/boardrules.dir/cheshir.html")
| Cheshire Cat Chess
figure.diagram-container
.diagram
- | fen:rbkxxxbn/ppxppppx/2qxxB2/4x2p/3P1x2/3n1x2/PPPxPPPP/RBxxxNKR b2,f2,b4,c5,g5,f6:
+ | fen:cwkxxxwn/ppxppppx/2mxxW2/4x2p/3P1x2/3n1x2/PPPxPPPP/CWxxxNKC b2,f2,b4,c5,g5,f6:
figcaption Posibles movimientos para el caballo en d3.
p.
h3 ¿Como las piezas se mueven?
+p Tres piezas nuevas reemplazan los "deslizadores" habituales:
+
+figure.showPieces.text-center
+ img(src="/images/pieces/Wormhole/wc.png" style="width:60px")
+ img(src="/images/pieces/Wormhole/ww.png" style="width:60px")
+ img(src="/images/pieces/Wormhole/wm.png" style="width:60px")
+ figcaption De izquierda a derecha: Campeón, Hechicero, León "Murray".
+
ul
- li La torre se mueve de una o dos casillas verticalmente u horizontalmente.
- li El alfil se mueve de una o dos casillas en diagonal.
- li La dama puede moverse como una torre o un alfil.
+ li.
+ El campeón se mueve dos casillas en cualquier dirección,
+ o bien una casilla ortogonalmente.
+ li.
+ El hechicero se mueve como un caballo reclinado: dos cuadrados en uno
+ dirección ortogonal, luego un paso diagonal. O solo un paso en diagonal.
+ li.
+ El león "Murray" se mueve dos cuadrados en cualquier dirección.
+ También puede (solo) capturar de una casilla como un rey.
li Las otras piezas se mueven como en el ajedrez ortodoxo.
p Todas las piezas pueden saltar sobre otras cuando se mueven dos espacios.
a(href="https://www.chessvariants.com/32turn.dir/wormhole.html")
| variante Wormhole
| en chessvariants.com.
- | Cambié los movimientos de las piezas porque las descritas aquí
- | Parece más adecuado. Esto podría evolucionar.
p
- | Inventor (con otros movimientos de piezas): Fergus Duniho (2000).
+ | Inventor: Fergus Duniho (2000).
| Similar a
a(href="https://www.chessvariants.com/boardrules.dir/cheshir.html")
| Cheshire Cat Chess
figure.diagram-container
.diagram
- | fen:rbkxxxbn/ppxppppx/2qxxB2/4x2p/3P1x2/3n1x2/PPPxPPPP/RBxxxNKR b2,f2,b4,c5,g5,f6:
+ | fen:cwkxxxwn/ppxppppx/2mxxW2/4x2p/3P1x2/3n1x2/PPPxPPPP/CWxxxNKC b2,f2,b4,c5,g5,f6:
figcaption Coups possibles pour le cavalier en d3.
p.
h3 Déplacement des pièces
+p Trois nouvelles pièces remplacent les "glisseurs" usuels :
+
+figure.showPieces.text-center
+ img(src="/images/pieces/Wormhole/wc.png" style="width:60px")
+ img(src="/images/pieces/Wormhole/ww.png" style="width:60px")
+ img(src="/images/pieces/Wormhole/wm.png" style="width:60px")
+ figcaption De gauche à droite : Champion, Sorcier, Lion "Murray".
+
ul
- li La tour se déplace d'une ou deux cases verticalement ou horizontalement.
- li Le fous se déplace d'une ou deux cases en diagonale.
- li La dame peut se mouvoir comme une tour ou un fou.
+ li.
+ Le champion se déplace de deux cases dans n'importe quelle direction,
+ ou bien d'une case orthogonalement.
+ li.
+ Le sorcier se déplace comme un cavalier allongé : deux cases dans une
+ direction orthogonale, puis un pas diagonal. Ou, un seul pas diagonal.
+ li.
+ Le lion "Murray" se déplace de deux cases dans n'importe quelle direction.
+ Il peut aussi (seulement) capturer d'une case comme un roi.
li Les autres pièces se déplacent comme aux échecs orthodoxes.
p.
Toutes les pièces peuvent sauter par dessus d'autres
a(href="https://www.chessvariants.com/32turn.dir/wormhole.html")
| variante Wormhole
| sur chessvariants.com.
- | J'ai changé les déplacements des pièces car ceux décrits ici me
- | paraissent mieux adaptés. Ceci pourrait évoluer.
p
- | Inventeur (avec d'autres déplacements de pièces) : Fergus Duniho (2000).
+ | Inventeur : Fergus Duniho (2000).
| Similaire à
a(href="https://www.chessvariants.com/boardrules.dir/cheshir.html")
| Cheshire Cat Chess
--- /dev/null
+p.boxed
+ | When a piece moves, the initial square disappears. It creates a
+ a(href="https://en.wikipedia.org/wiki/Wormhole") "wormhole"
+ | .
+
+p
+ a(href="/#/variants/Wormhole1") Wormhole1
+ | variant, with more standard pieces' movements:
+ul
+ li The rook moves one or two squares vertically or horizontally.
+ li The bishop moves one or two squares diagonally.
+ li The queen moves either like a rook or like a bishop.
+ li The other pieces move like in orthodox chess.
+p All pieces can jump over others when moving by two squares.
--- /dev/null
+p.boxed
+ | Cuando una pieza se mueve, la casilla inicial desaparece. Esto crea un
+ a(href="https://es.wikipedia.org/wiki/Agujero_de_gusano") "agujero de gusano"
+ | .
+
+p
+ a(href="/#/variants/Wormhole1") Wormhole1
+ | variant, con movimientos de piezas más estándar:
+ul
+ li La torre se mueve de una o dos casillas verticalmente u horizontalmente.
+ li El alfil se mueve de una o dos casillas en diagonal.
+ li La dama puede moverse como una torre o un alfil.
+ li Las otras piezas se mueven como en el ajedrez ortodoxo.
+p Todas las piezas pueden saltar sobre otras cuando se mueven dos espacios.
--- /dev/null
+p.boxed
+ | Quand une pièce se déplace, la case initiale disparaît. Cela crée un
+ a(href="https://fr.wikipedia.org/wiki/Trou_de_ver") "trou de ver"
+ | .
+
+p
+ a(href="/#/variants/Wormhole1") Wormhole1
+ | variant, avec des mouvements de pièces plus standard :
+ul
+ li La tour se déplace d'une ou deux cases verticalement ou horizontalement.
+ li Le fou se déplace d'une ou deux cases en diagonale.
+ li La dame peut se mouvoir comme une tour ou un fou.
+ li Les autres pièces se déplacent comme aux échecs orthodoxes.
+p.
+ Toutes les pièces peuvent sauter par dessus d'autres
+ quand elles se déplacent de deux cases.
"Refusal",
"Relayup",
"Rollerball",
- "Selfabsorption",
+ "Selfabsorb",
"Takenmake",
- "Wormhole"
+ "Wormhole1",
+ "Wormhole2"
]
ul
for v in varlist
"Refusal",
"Relayup",
"Rollerball",
- "Selfabsorption",
+ "Selfabsorb",
"Takenmake",
- "Wormhole"
+ "Wormhole1",
+ "Wormhole2"
]
ul
for v in varlist
"Refusal",
"Relayup",
"Rollerball",
- "Selfabsorption",
+ "Selfabsorb",
"Takenmake",
- "Wormhole"
+ "Wormhole1",
+ "Wormhole2"
]
ul
for v in varlist
import { ChessRules } from "@/base_rules";
import { AbsorptionRules } from "@/variants/Absorption";
-export class SelfabsorptionRules extends AbsorptionRules {
+export class SelfabsorbRules extends AbsorptionRules {
canTake([x1, y1], [x2, y2]) {
if (this.getColor(x1, y1) !== this.getColor(x2, y2)) return true;
--- /dev/null
+import { ChessRules } from "@/base_rules";
+import { Wormhole2Rules } from "@/variants/Wormhole2";
+
+export class Wormhole1Rules extends Wormhole2Rules {
+
+ static get PawnSpecs() {
+ return Object.assign(
+ {},
+ ChessRules.PawnSpecs,
+ { promotions: [V.LION, V.CHAMPION, V.WIZARD, V.KNIGHT] }
+ );
+ }
+
+ static get LION() {
+ return 'm';
+ }
+ static get WIZARD() {
+ return 'w';
+ }
+ static get CHAMPION() {
+ return 'c';
+ }
+
+ static get PIECES() {
+ return [V.PAWN, V.CHAMPION, V.KNIGHT, V.WIZARD, V.LION, V.KING];
+ }
+
+ getPpath(b) {
+ if (b[0] == 'x') return "Wormhole/hole";
+ if ([V.LION, V.CHAMPION, V.WIZARD].includes(b[1]))
+ return "Wormhole/" + b;
+ return b;
+ }
+
+ static get steps() {
+ return {
+ w: [
+ [ [-2, 0], [-1, -1] ],
+ [ [-2, 0], [-1, 1] ],
+ [ [0, -2], [-1, -1] ],
+ [ [0, 2], [-1, 1] ],
+ [ [0, -2], [1, -1] ],
+ [ [0, 2], [1, 1] ],
+ [ [2, 0], [1, -1] ],
+ [ [2, 0], [1, 1] ]
+ ],
+ d: [
+ [-2, 0],
+ [0, -2],
+ [2, 0],
+ [0, 2]
+ ],
+ a: [
+ [2, 2],
+ [2, -2],
+ [-2, 2],
+ [-2, -2]
+ ],
+ f: [
+ [-1, -1],
+ [-1, 1],
+ [1, -1],
+ [1, 1]
+ ],
+ z: [
+ [-1, 0],
+ [1, 0],
+ [0, -1],
+ [0, 1]
+ ],
+ n: Wormhole2Rules.steps[V.KNIGHT],
+ k: Wormhole2Rules.steps[V.KING]
+ };
+ }
+
+ static GenRandInitFen(randomness) {
+ if (randomness == 0)
+ return "cnwmkwnc/pppppppp/8/8/8/8/PPPPPPPP/CNWMKWNC w 0";
+
+ // Mapping new --> standard:
+ const piecesMap = {
+ 'r': 'c',
+ 'n': 'n',
+ 'b': 'w',
+ 'q': 'm',
+ 'k': 'k'
+ };
+
+ const baseFen = ChessRules.GenRandInitFen(randomness);
+ return (
+ baseFen.substr(0, 8).split('').map(p => piecesMap[p]).join('') +
+ baseFen.substr(8, 27) +
+ baseFen.substr(35, 43).split('')
+ .map(p => piecesMap[p]).join('').toUpperCase() +
+ " w 0"
+ );
+ }
+
+ getPotentialMovesFrom(sq) {
+ switch (this.getPiece(sq[0], sq[1])) {
+ case V.PAWN: return super.getPotentialPawnMoves(sq);
+ case V.CHAMPION: return this.getPotentialChampionMoves(sq);
+ case V.KNIGHT: return super.getPotentialKnightMoves(sq);
+ case V.WIZARD: return this.getPotentialWizardMoves(sq);
+ case V.LION: return this.getPotentialLionMoves(sq);
+ case V.KING: return super.getPotentialKingMoves(sq);
+ }
+ return [];
+ }
+
+ getJumpMoves([x, y], steps, onlyTake) {
+ let moves = [];
+ for (let step of steps) {
+ const sq = this.getSquareAfter([x,y], step);
+ if (sq &&
+ (
+ (!onlyTake && this.board[sq[0]][sq[1]] == V.EMPTY) ||
+ (this.board[sq[0]][sq[1]] != V.EMPTY && this.canTake([x, y], sq))
+ )
+ ) {
+ moves.push(this.getBasicMove([x, y], sq));
+ }
+ }
+ return moves;
+ }
+
+ getPotentialChampionMoves(sq) {
+ const steps = V.steps['d'].concat(V.steps['a']).concat(V.steps['z']);
+ return this.getJumpMoves(sq, steps);
+ }
+
+ getPotentialWizardMoves(sq) {
+ const steps = V.steps['w'].concat(V.steps['f']);
+ return this.getJumpMoves(sq, steps);
+ }
+
+ getPotentialLionMoves(sq) {
+ let steps = V.steps['d'].concat(V.steps['a']);
+ const moves1 = this.getJumpMoves(sq, steps);
+ steps = V.steps['f'].concat(V.steps['z']);
+ const moves2 = this.getJumpMoves(sq, steps, "onlyTake");
+ return moves1.concat(moves2);
+ }
+
+ isAttacked(sq, color) {
+ return (
+ super.isAttackedByPawn(sq, color) ||
+ this.isAttackedByChampion(sq, color) ||
+ super.isAttackedByKnight(sq, color) ||
+ this.isAttackedByWizard(sq, color) ||
+ this.isAttackedByLion(sq, color) ||
+ super.isAttackedByKing(sq, color)
+ );
+ }
+
+ isAttackedByWizard(sq, color) {
+ return (
+ this.isAttackedByJump(sq, color, V.WIZARD, V.steps['f']) ||
+ // NOTE: wizard attack is not symmetric in this variant:
+ // steps order need to be reversed.
+ this.isAttackedByJump(
+ sq,
+ color,
+ V.WIZARD,
+ V.steps['w'].map(s => s.reverse())
+ )
+ );
+ }
+
+ isAttackedByChampion(sq, color) {
+ const steps = V.steps['d'].concat(V.steps['a']).concat(V.steps['z']);
+ return this.isAttackedByJump(sq, color, V.CHAMPION, steps);
+ }
+
+ isAttackedByLion(sq, color) {
+ const steps = V.steps['d'].concat(V.steps['a'])
+ .concat(V.steps['f']).concat(V.steps['z']);
+ return this.isAttackedByJump(sq, color, V.LION, steps);
+ }
+
+ static get VALUES() {
+ return {
+ p: 1,
+ n: 3,
+ c: 8,
+ m: 9,
+ w: 3,
+ k: 1000
+ };
+ }
+
+};
import { ChessRules } from "@/base_rules";
-export class WormholeRules extends ChessRules {
+export class Wormhole2Rules extends ChessRules {
static get HasFlags() {
return false;
this.canTake([x, y], sq)
)
) {
- moves.push(this.getBasicMove([x, y], sq));
+ moves.push(this.getBasicMove([x, y], sq));
}
}
return moves;
this.canTake([x, y], [sq[0], sq[1]])
) {
const finalPieces = sq[0] == lastRank
- ? [V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN]
+ ? V.PawnSpecs.promotions
: [V.PAWN];
for (let piece of finalPieces) {
moves.push(
('Rugby', 'Transform an essay'),
('Schess', 'Seirawan-Harper Chess'),
('Screen', 'Free initial setup'),
- ('Selfabsorption', 'Fusion pieces (v2)'),
+ ('Selfabsorb', 'Fusion pieces (v2)'),
('Shako', 'Non-conformism and utopia'),
('Shatranj', 'Ancient rules'),
('Shogi', 'Japanese Chess'),
('Upsidedown', 'Board upside down'),
('Vchess', 'Pawns capture backward'),
('Wildebeest', 'Balanced sliders & leapers'),
- ('Wormhole', 'Squares disappear'),
+ ('Wormhole1', 'Squares disappear (v1)'),
+ ('Wormhole2', 'Squares disappear (v2)'),
('Xiangqi', 'Chinese Chess'),
('Yote', 'African Draughts'),
('Zen', 'Reverse captures');