"Capture both colors": "Capture both colors",
"Capture en passant": "Capture en passant",
"Capture on the edge": "Capture on the edge",
- "Capture powers": "Capture powers",
+ "Capture powers (v1)": "Capture powers (v1)",
+ "Capture powers (v2)": "Capture powers (v2)",
"Capture the princess": "Capture the princess",
"Captures reborn": "Captures reborn",
"Change colors": "Change colors",
"Capture both colors": "Captura ambos colores",
"Capture en passant": "Capturar en passant",
"Capture on the edge": "Capturar en el borde",
- "Capture powers": "Capturar los poderes",
+ "Capture powers (v1)": "Capturar los poderes (v1)",
+ "Capture powers (v2)": "Capturar los poderes (v2)",
"Capture the princess": "Capturar a la princesa",
"Captures reborn": "Las capturas renacen",
"Change colors": "Cambiar colores",
"Capture both colors": "Capturer les deux couleurs",
"Capture en passant": "Capturer en passant",
"Capture on the edge": "Capturer sur le bord",
- "Capture powers": "Capturer les pouvoirs",
+ "Capture powers (v1)": "Capturer les pouvoirs (v1)",
+ "Capture powers (v2)": "Capturer les pouvoirs (v2)",
"Capture the princess": "Capturer la princesse",
"Captures reborn": "Les captures renaissent",
"Change colors": "Changer les couleurs",
+++ /dev/null
-p.boxed
- | Captures are mandatory, with transformation into the captured piece.
-
-p.
- Everything is the same as in orthodox rules, except that when possible,
- captures are forced.
- The goal is still to checkmate, and stalemate is a draw.
-
-p.
- After each capture the capturer takes the nature of the captured piece.
- For example after 1.e4 a6 2.Bxa6 is forced and a6 is now a white pawn.
-
-figure.diagram-container
- .diagram
- | fen:rnbqkbnr/1ppppppp/p7/8/4P3/8/PPPP1PPP/RNBQKBNR a6:
- figcaption After 1.e4 a6, 2.Bxa6 turns the bishop into a pawn.
-
-p If the king captures, it transforms as well but stays royal.
-
-h3 More information
-
-p
- a(href="https://www.chessvariants.com/difftaking.dir/cannibal.html")
- | Cannibal Chess
- | on chessvariants.com. I added the forced captures for more fun.
+++ /dev/null
-p.boxed
- | Las capturas son obligatorias, con transformación en la pieza capturada.
-
-p.
- Todo va como el ajedrez ortodoxo, pero cuando es posible
- las capturas son forzadas.
- El objetivo aún es de matar, y el empate es tablas.
-
-p.
- Después de cada captura, el atacante toma la naturaleza de la pieza capturada.
- Por ejemplo, después de 1.e4 a6 2.Bxa6 es forzado y a6 ahora es un peón blanco.
-
-figure.diagram-container
- .diagram
- | fen:rnbqkbnr/1ppppppp/p7/8/4P3/8/PPPP1PPP/RNBQKBNR a6:
- figcaption Después de 1.e4 a6, 2.Bxa6 transforma el alfil en un peón.
-
-p Si el rey captura, también se transforma pero permanece real.
-
-h3 Más información
-
-p
- | La
- a(href="https://www.chessvariants.com/difftaking.dir/cannibal.html")
- | variante Cannibal
- | en chessvariants.com.
- | Esta regla me parece más divertida con las capturas obligatorias.
+++ /dev/null
-p.boxed
- | Les captures sont obligatoires, avec transformation en la pièce capturée.
-
-p.
- Tout se déroule comme aux échecs orthodoxes, mais quand elles sont possibles
- les captures sont forcées.
- L'objectif est toujours de mater, et le pat fait nulle.
-
-p.
- Après chaque capture, l'attaquant prend la nature de la pièce capturée.
- Par exemple après 1.e4 a6 2.Bxa6 est forcé et a6 est maintenant un pion blanc.
-
-figure.diagram-container
- .diagram
- | fen:rnbqkbnr/1ppppppp/p7/8/4P3/8/PPPP1PPP/RNBQKBNR a6:
- figcaption Après 1.e4 a6, 2.Bxa6 transforme le fou en un pion.
-
-p Si le roi capture, il se transforme aussi mais reste royal.
-
-h3 Plus d'information
-
-p
- | La
- a(href="https://www.chessvariants.com/difftaking.dir/cannibal.html")
- | variante Cannibal
- | sur chessvariants.com.
- | Cett règle me paraît plus amusante avec des captures obligatoires.
--- /dev/null
+p.boxed
+ | Captures turn the capturer into the captured piece.
+
+p.
+ Everything is the same as in orthodox rules, with one exception:
+ after each capture, the capturer takes the nature of the captured piece.
+ The goal is still to checkmate, and stalemate is a draw.
+
+p.
+ For example after 1.e4 e5 2.Nf3 b6 3.Nxe5, e5 is now a white pawn.
+ This capture seems bad, but anything which capture e5 later
+ will turn into a pawn...
+
+figure.diagram-container
+ .diagram.diag12
+ | fen:rnbqkbnr/p1pp1ppp/1p6/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R:
+ .diagram.diag22
+ | fen:rnbqkbnr/p1pp1ppp/1p6/4P3/4P3/8/PPPP1PPP/RNBQKB1R:
+ figcaption After 1.e4 e5 2.Nf3 b6 (left) with 3.Nxe5 (right)
+
+p If the king captures, it transforms as well but stays royal.
+
+h3 More information
+
+p
+ a(href="https://www.chessvariants.com/difftaking.dir/cannibal.html")
+ | Cannibal Chess
+ | on chessvariants.com.
--- /dev/null
+p.boxed
+ | Las caturas transforman la pieza que captura en la pieza capturada.
+
+p.
+ Todo va como el ajedrez ortodoxo, con una excepcion: después de
+ cada captura, el atacante toma la naturaleza de la pieza capturada.
+ El objetivo aún es de matar, y el empate es tablas.
+
+p.
+ Por ejemplo, después de 1.e4 e5 2.Nf3 b6 3.Nxe5, e5 es ahora un peón blanco.
+ Esta captura se ve mal, pero cualquier pieza que tome e5 más tarde
+ se convertirá en un peón...
+
+figure.diagram-container
+ .diagram.diag12
+ | fen:rnbqkbnr/p1pp1ppp/1p6/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R:
+ .diagram.diag22
+ | fen:rnbqkbnr/p1pp1ppp/1p6/4P3/4P3/8/PPPP1PPP/RNBQKB1R:
+ figcaption Después de 1.e4 e5 2.Nf3 b6 (izquierda) con 3.Cxe5 (derecha)
+
+p Si el rey captura, también se transforma pero permanece real.
+
+h3 Más información
+
+p
+ | La
+ a(href="https://www.chessvariants.com/difftaking.dir/cannibal.html")
+ | variante Cannibal
+ | en chessvariants.com.
--- /dev/null
+p.boxed
+ | Les captures transforment la pièce capturante en la pièce capturée.
+
+p.
+ Tout se déroule comme aux échecs orthodoxes, à une exception près :
+ après chaque capture, l'attaquant prend la nature de la pièce capturée.
+ L'objectif est toujours de mater, et le pat fait nulle.
+
+p.
+ Par exemple après 1.e4 e5 2.Nf3 b6 3.Nxe5, e5 est à présent un pion blanc.
+ Cette capture semble mauvaise, mais toute pièce prenant en e5 plus tard
+ se transformera en pion...
+
+figure.diagram-container
+ .diagram.diag12
+ | fen:rnbqkbnr/p1pp1ppp/1p6/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R:
+ .diagram.diag22
+ | fen:rnbqkbnr/p1pp1ppp/1p6/4P3/4P3/8/PPPP1PPP/RNBQKB1R:
+ figcaption Après 1.e4 e5 2.Nf3 b6 (gauche) avec 3.Nxe5 (droite)
+
+p Si le roi capture, il se transforme aussi mais reste royal.
+
+h3 Plus d'information
+
+p
+ | La
+ a(href="https://www.chessvariants.com/difftaking.dir/cannibal.html")
+ | variante Cannibal
+ | sur chessvariants.com.
--- /dev/null
+p.boxed
+ | Captures are mandatory, with transformation into the captured piece.
+
+p
+ a(href="/#/variants/Cannibal1") Cannibal1
+ | , with forced captures.
+ | I initially believed it was better like that. Not sure anymore :-)
+
+p For example after 1.e4 a6, 2.Bxa6 is forced and a6 is now a white pawn.
+
+figure.diagram-container
+ .diagram
+ | fen:rnbqkbnr/1ppppppp/p7/8/4P3/8/PPPP1PPP/RNBQKBNR a6:
+ figcaption After 1.e4 a6, 2.Bxa6 turns the bishop into a pawn.
--- /dev/null
+p.boxed
+ | Las capturas son obligatorias, con transformación en la pieza capturada.
+
+p
+ a(href="/#/variants/Cannibal1") Cannibal1
+ | , con capturas obligatorias.
+ | Pensé que era mejor así, pero ya no estoy seguro :-)
+
+p.
+ Por ejemplo después de 1.e4 a6, 2.Bxa6 es forzado
+ y a6 ahora es un peón blanco.
+
+figure.diagram-container
+ .diagram
+ | fen:rnbqkbnr/1ppppppp/p7/8/4P3/8/PPPP1PPP/RNBQKBNR a6:
+ figcaption Después de 1.e4 a6, 2.Bxa6 transforma el alfil en un peón.
--- /dev/null
+p.boxed
+ | Les captures sont obligatoires, avec transformation en la pièce capturée.
+
+p
+ a(href="/#/variants/Cannibal1") Cannibal1
+ | , avec captures obligatoires.
+ | Je pensais que c'était mieux ainsi, mais n'en suis plus très sûr :-)
+
+p Par exemple après 1.e4 a6, 2.Bxa6 est forcé et a6 est alors un pion blanc.
+
+figure.diagram-container
+ .diagram
+ | fen:rnbqkbnr/1ppppppp/p7/8/4P3/8/PPPP1PPP/RNBQKBNR a6:
+ figcaption Après 1.e4 a6, 2.Bxa6 transforme le fou en un pion.
"Arena",
"Capture",
"Losers",
- "Monochrome",
+ "Monocolor",
"Suicide"
]
ul
-
var varlist = [
"Absorption",
- "Cannibal"
+ "Cannibal1",
+ "Cannibal2"
]
ul
for v in varlist
"Arena",
"Capture",
"Losers",
- "Monochrome",
+ "Monocolor",
"Suicide"
]
ul
-
var varlist = [
"Absorption",
- "Cannibal"
+ "Cannibal1",
+ "Cannibal2"
]
ul
for v in varlist
"Arena",
"Capture",
"Losers",
- "Monochrome",
+ "Monocolor",
"Suicide"
]
ul
-
var varlist = [
"Absorption",
- "Cannibal"
+ "Cannibal1",
+ "Cannibal2"
]
ul
for v in varlist
import { ChessRules, Move, PiPo } from "@/base_rules";
-export class CannibalRules extends ChessRules {
+export class Cannibal1Rules extends ChessRules {
static get KING_CODE() {
return {
}
}
- // Trim all non-capturing moves
- static KeepCaptures(moves) {
- return moves.filter(m => m.vanish.length == 2 && m.appear.length == 1);
- }
-
- // Stop at the first capture found (if any)
- atLeastOneCapture() {
- const color = this.turn;
- const oppCol = V.GetOppCol(color);
- 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 &&
- this.getColor(i, j) != oppCol &&
- this.filterValid(this.getPotentialMovesFrom([i, j])).some(m =>
- // Warning: discard castle moves
- m.vanish.length == 2 && m.appear.length == 1)
- ) {
- return true;
- }
- }
- }
- return false;
- }
-
// Because of the disguised kings, getPiece() could be wrong:
// use board[x][y][1] instead (always valid).
getBasicMove([sx, sy], [ex, ey], tr) {
return super.getPotentialMovesFrom([x, y], piece);
}
- addPawnMoves([x1, y1], [x2, y2], moves) {
- let finalPieces = [V.PAWN];
- const color = this.turn;
- const lastRank = (color == "w" ? 0 : V.size.x - 1);
- if (x2 == lastRank) {
- if (this.board[x2][y2] != V.EMPTY)
- // Cannibal rules: no choice if capture
- finalPieces = [this.getPiece(x2, y2)];
- else finalPieces = V.PawnSpecs.promotions;
- }
- let tr = null;
- for (let piece of finalPieces) {
- tr = (piece != V.PAWN ? { c: color, p: piece } : null);
- moves.push(this.getBasicMove([x1, y1], [x2, y2], tr));
- }
- }
-
- getPossibleMovesFrom(sq) {
- let moves = this.filterValid(this.getPotentialMovesFrom(sq));
- const captureMoves = V.KeepCaptures(moves);
- if (captureMoves.length > 0) return captureMoves;
- if (this.atLeastOneCapture()) return [];
- return moves;
- }
-
- getAllValidMoves() {
- const moves = super.getAllValidMoves();
- if (moves.some(m => m.vanish.length == 2 && m.appear.length == 1))
- return V.KeepCaptures(moves);
- return moves;
- }
-
postPlay(move) {
const c = V.GetOppCol(this.turn);
const piece = move.appear[0].p;
--- /dev/null
+import { ChessRules, Move, PiPo } from "@/base_rules";
+import { Cannibal1Rules } from "@/variants/Cannibal1";
+
+export class Cannibal2Rules extends Cannibal1Rules {
+
+ // Trim all non-capturing moves
+ static KeepCaptures(moves) {
+ return moves.filter(m => m.vanish.length == 2 && m.appear.length == 1);
+ }
+
+ // Stop at the first capture found (if any)
+ atLeastOneCapture() {
+ const color = this.turn;
+ const oppCol = V.GetOppCol(color);
+ 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 &&
+ this.getColor(i, j) != oppCol &&
+ this.filterValid(this.getPotentialMovesFrom([i, j])).some(m =>
+ // Warning: discard castle moves
+ m.vanish.length == 2 && m.appear.length == 1)
+ ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ addPawnMoves([x1, y1], [x2, y2], moves) {
+ let finalPieces = [V.PAWN];
+ const color = this.turn;
+ const lastRank = (color == "w" ? 0 : V.size.x - 1);
+ if (x2 == lastRank) {
+ if (this.board[x2][y2] != V.EMPTY)
+ // Cannibal rules: no choice if capture
+ finalPieces = [this.getPiece(x2, y2)];
+ else finalPieces = V.PawnSpecs.promotions;
+ }
+ let tr = null;
+ for (let piece of finalPieces) {
+ tr = (piece != V.PAWN ? { c: color, p: piece } : null);
+ moves.push(this.getBasicMove([x1, y1], [x2, y2], tr));
+ }
+ }
+
+ getPossibleMovesFrom(sq) {
+ let moves = this.filterValid(this.getPotentialMovesFrom(sq));
+ const captureMoves = V.KeepCaptures(moves);
+ if (captureMoves.length > 0) return captureMoves;
+ if (this.atLeastOneCapture()) return [];
+ return moves;
+ }
+
+ getAllValidMoves() {
+ const moves = super.getAllValidMoves();
+ if (moves.some(m => m.vanish.length == 2 && m.appear.length == 1))
+ return V.KeepCaptures(moves);
+ return moves;
+ }
+
+};
import { ChessRules } from "@/base_rules";
-export class MonochromeRules extends ChessRules {
+export class MonocolorRules extends ChessRules {
static get HasEnpassant() {
// Pawns would be on the same side
('Bicolour', 'Harassed kings'),
('Bishopawns', 'Bishop versus pawns'),
('Brotherhood', 'Friendly pieces'),
- ('Cannibal', 'Capture powers'),
+ ('Cannibal1', 'Capture powers (v1)'),
+ ('Cannibal2', 'Capture powers (v2)'),
('Capablanca', 'Capablanca Chess'),
('Capture', 'Mandatory captures'),
('Castle', 'Win by castling long'),
('Mesmer', 'Mind control (v2)'),
('Minishogi', 'Shogi 5 x 5'),
('Minixiangqi', 'Xiangqi 7 x 7'),
- ('Monochrome', 'All of the same color'),
+ ('Monocolor', 'All of the same color'),
('Monster', 'White move twice'),
('Musketeer', 'New fairy pieces'),
('Omega', 'A wizard in the corner'),