From: Benjamin Auder Date: Thu, 21 Apr 2022 08:02:33 +0000 (+0200) Subject: Doublemove ok. Still some random issues with animation X-Git-Url: https://git.auder.net/variants/current/doc/scripts/DESCRIPTION?a=commitdiff_plain;h=6f74b81a893da23181f30e2ef1e68bde8a5476cd;p=xogo.git Doublemove ok. Still some random issues with animation --- diff --git a/base_rules.js b/base_rules.js index 0dfe217..6efce02 100644 --- a/base_rules.js +++ b/base_rules.js @@ -2124,7 +2124,13 @@ export default class ChessRules { (this.options["progressive"] && this.subTurn <= this.movesCount) ) { const oppKingPos = this.searchKingPos(oppCol); - if (oppKingPos[0] >= 0 && !this.underCheck(oppKingPos, color)) { + if ( + oppKingPos[0] >= 0 && + ( + this.options["taking"] || + !this.underCheck(oppKingPos, color) + ) + ) { this.subTurn++; return; } diff --git a/common.css b/common.css index 6450242..91fd2a6 100644 --- a/common.css +++ b/common.css @@ -52,6 +52,11 @@ main > div { } } +.author { + color: darkblue; + font-style: italic; +} + #boardContainer { margin: 0; padding: 0; diff --git a/variants.js b/variants.js index 6daa94b..879b139 100644 --- a/variants.js +++ b/variants.js @@ -18,7 +18,7 @@ const variants = [ // { name: 'Bario', desc: 'A quantum story' }, {name: "Balanced", desc: "balanced chess"}, // { name: 'Baroque', desc: 'Exotic captures' },*/ -// { name: "Benedict", desc: "Change colors" }, + { name: "Benedict", desc: "Change colors" }, // { name: 'Berolina', desc: 'Pawns move diagonally' }, // { name: 'Bicolour', desc: 'Harassed kings' }, // { name: 'Bishopawns', desc: 'Bishop versus pawns', disp: 'Bishop-Pawns' }, diff --git a/variants/Atomic/class.js b/variants/Atomic/class.js index 7cac4e5..ad2e9a1 100644 --- a/variants/Atomic/class.js +++ b/variants/Atomic/class.js @@ -25,22 +25,7 @@ export default class AtomicRules extends ChessRules { constructor(o) { super(o); - this.options.atomic = true; - } - - genRandInitFen(seed) { - return super.genRandInitFen(seed).slice(0, -1) + ',"rempawn":' + (this.options.rempawn ? "1" : "0") + "}"; - } - - // TODO: capture king option doesn't make sense - - setOtherVariables(fenParsed) { - super.setOtherVariables(fenParsed); - this.options["rempawn"] = (fenParsed.rempawn == 1); - } - - getFen() { - return super.getFen().slice(0, -1) + ',"rempawn":' + (this.options["rempawn"] ? "1" : "0") + "}"; + this.options["atomic"] = true; } canIplay(x, y) { diff --git a/variants/Benedict/rules.html b/variants/Benedict/rules.html index 0211f6b..1a21c0c 100644 --- a/variants/Benedict/rules.html +++ b/variants/Benedict/rules.html @@ -1 +1,5 @@ -Benedict rules. +

After each move, all units attacked by the moving piece change color.

+ +

Goal: change the enemy king's color.

+ +

William Daniel Troyka (2001).

diff --git a/variants/Chakart/rules.html b/variants/Chakart/rules.html index 7d3681f..c87be5c 100644 --- a/variants/Chakart/rules.html +++ b/variants/Chakart/rules.html @@ -6,3 +6,5 @@
  • Bombs redirect by one square diagonally.
  • Eggs hide either a bonus or malus, as indicated...
  • + +

    Charlotte Blard & Benjamin Auder (2020).

    diff --git a/variants/Dark/rules.html b/variants/Dark/rules.html index 4fefa83..8716272 100644 --- a/variants/Dark/rules.html +++ b/variants/Dark/rules.html @@ -1,3 +1,5 @@

    You only see what your pieces can reach and capture.

    Win by capturing the enemy king.

    + +

    Jens Baek Nielsen (1997).

    diff --git a/variants/Doublemove/rules.html b/variants/Doublemove/rules.html index 569f213..56054c8 100644 --- a/variants/Doublemove/rules.html +++ b/variants/Doublemove/rules.html @@ -1,3 +1,3 @@ -

    Pieces capture enemy units which threaten them (normal captures are disabled).

    +

    After the initial white move, each player moves twice on each turn.

    -

    Exception: the king is attacked as usual.

    +

    Albert Fortis (1922).

    diff --git a/variants/Zen/rules.html b/variants/Zen/rules.html index 569f213..1508496 100644 --- a/variants/Zen/rules.html +++ b/variants/Zen/rules.html @@ -1,3 +1,5 @@

    Pieces capture enemy units which threaten them (normal captures are disabled).

    Exception: the king is attacked as usual.

    + +

    Moe Moss (1970).