"Squat last rank (v2)": "Occupez la dernière rangée (v2)",
"Standard rules": "Règles usuelles",
"Stun & kick pieces": "Étourdissez & frappez les pièces",
- "Thai Chess": "Échecs thai",
+ "Thai Chess (v1)": "Échecs thai (v1)",
+ "Thai Chess (v2)": "Échecs thai (v2)",
"The colorbound clobberers": "Les tabasseurs unicolores",
"The end of the world": "La fin du monde",
"Transform an essay": "Transformer un essai",
ul
li.
Pawns can jump two squares only from their initial rank, and only once in
- the game: a checkered pawn returning on the pawns' start rank cannot jump.
- However:
- li.
- A pawn captured on its starting square (thus becoming "checkered") keeps
- the right to advance two squares.
+ the game. A checkered pawn keeps this right if the starting pawn
+ did not use it.
li.
Checkered pawns cannot capture en passant, because while the pawn was
"passing" they were of the same color.
ul
li.
- Los peones pueden avanzar solo dos espacios desde su fila
- punto de partida, y solo una vez en el juego: un peón a cuadros
- volver a una fila inicial no puede avanzar dos espacios.
- Sin embargo:
- li.
- Un peón a cuadros de una captura en la fila inicial mantiene
- el derecho a avanzar dos espacios.
+ Los peones pueden avanzar dos espacios solo desde su fila
+ punto de partida, y solo una vez en el juego. Un peón a cuadros
+ retiene este derecho si el peón inicial no lo ha usado.
li.
Los peones a cuadros no pueden capturar en passant, ya que mientras
el peón contrario "pasó" estaban en el mismo campamento.
ul
li.
Les pions peuvent avancer de deux cases seulement depuis leur rangée
- de départ, et ce une seule fois dans la partie : un pion échiqueté
- revenant sur une rangée de départ ne peut pas avancer de deux cases.
- Cependant :
- li.
- Un pion échiqueté issu d'une capture sur la rangée de départ garde
- le droit d'avancer de deux cases.
+ de départ, et ce une seule fois dans la partie. Un pion échiqueté
+ conserve ce droit si le pion initial ne l'a pas utilisé.
li.
Les pions échiquetés ne peuvent capturer en passant, puisque pendant que
le pion adverse "passait" ils étaient dans le même camp.
--- /dev/null
+p.boxed
+ | TODO
--- /dev/null
+p.boxed
+ | TODO
--- /dev/null
+p.boxed
+ | TODO
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=2; i<8; i++) {
- if (positions[i] % 2 != rem2)
+ if (positions[i] % 2 != rem2) {
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=4; i<9; i++) {
- if (positions[i] % 2 != rem2)
+ if (positions[i] % 2 != rem2) {
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
rem2 = positions[2] % 2;
this.kingPos[c][1] = move.appear[0].y;
}
super.updateCastleFlags(move, piece);
- // Does this move turn off a 2-squares pawn flag?
- if ([1, 6].includes(move.start.x) && move.vanish[0].p == V.PAWN)
+ if (
+ [1, 6].includes(move.start.x) &&
+ move.vanish[0].p == V.PAWN &&
+ Math.abs(move.end.x - move.start.x) == 2
+ ) {
+ // This move turns off a 2-squares pawn flag
this.pawnFlags[move.start.x == 6 ? "w" : "b"][move.start.y] = false;
+ }
}
this.cmoves.push(this.getCmove(move));
}
postPlay(move) {
super.postPlay(move);
// Does this move turn off a 2-squares pawn flag?
- if ([1, 6].includes(move.start.x) && move.vanish[0].p == V.PAWN)
+ if (
+ [1, 6].includes(move.start.x) &&
+ move.vanish[0].p == V.PAWN &&
+ Math.abs(move.end.x - move.start.x) == 2
+ ) {
this.pawnFlags[move.start.x == 6 ? "w" : "b"][move.start.y] = false;
+ }
this.cmoves.push(this.getCmove(move));
}
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=2; i<8; i++) {
- if (positions[i] % 2 != rem2)
+ if (positions[i] % 2 != rem2) {
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=2; i<8; i++) {
- if (positions[i] % 2 != rem2)
+ if (positions[i] % 2 != rem2) {
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];
if (randomness == 0)
return "rnbq1knbr/9/9/9/4a4/9/9/9/RNBQ1KNBR w 0";
- // TODO: following is mostly copy-paste from Suicide variant
let pieces = { w: new Array(8), b: new Array(8) };
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
// Get random squares for every piece, totally freely
let positions = shuffle(ArrayFun.range(8));
const composition = ['b', 'b', 'r', 'r', 'n', 'n', 'k', 'q'];
- const rem2 = positions[0] % 2;
- if (rem2 == positions[1] % 2) {
- // Fix bishops (on different colors)
+ // Fix bishops (on different colors)
+ const realOddity =
+ (pos) => { return (pos <= 3 ? pos % 2 : (pos + 1) % 2); };
+ const rem2 = realOddity(positions[0]);
+ if (rem2 == realOddity(positions[1])) {
for (let i=2; i<8; i++) {
- if (positions[i] % 2 != rem2)
+ if (realOddity(positions[i]) != rem2) {
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=2; i<8; i++) {
- if (positions[i] % 2 != rem2)
+ if (positions[i] % 2 != rem2) {
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];