From 9a036f5fbfe3cc1df18b47e43d5db293de013e47 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sat, 23 Jul 2022 19:00:21 +0200 Subject: [PATCH] Just save current state --- variants/Baroque/complete_rules.html | 190 +++++++++++++++++++++++++++ variants/Baroque/rules.html | 14 +- variants/Berolina/class.js | 25 ++++ 3 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 variants/Baroque/complete_rules.html create mode 100644 variants/Berolina/class.js diff --git a/variants/Baroque/complete_rules.html b/variants/Baroque/complete_rules.html new file mode 100644 index 0000000..1ac46cc --- /dev/null +++ b/variants/Baroque/complete_rules.html @@ -0,0 +1,190 @@ + + + Baroque Rules + + + + + +
+

Baroque Rules

+ +
+

Pieces names

+

Pieces names refer to the way they capture, which is described later.

+
    +
  • Pawn : Pawn or Pincer
  • +
  • Rook : Coordinator
  • +
  • Knight : Long Leaper
  • +
  • Bishop : Chameleon
  • +
  • Queen : Withdrawer
  • +
  • King : King (same behavior as in standard chess)
  • +
+

+ There is also a new piece : the immobilizer, + represented by an upside-down rook. +

+
+
+
+
Immobilizers on d2 and e6.
+
+
+ +
+

Non-capturing moves

+

+ Pawns move as orthodox rooks, and the king moves as usual, + one square in any direction. + All other pieces move like an orthodox queen. +

+

+ When a piece is adjacent to an enemy immobilizer, it cannot move unless + the enemy immobilizer is adjacent to a friendly immobilizer or chameleon + (cancelling the powers of the opponent's immobilizer). +

+

+ Note : this corresponds to the "pure rules" described on + + this page + + , which slightly differ from the initial rules. + The aim is to get rid of the weird suicide rule by weakening the + immobilizers lock. In particular, in the original rules two adjacent + immobilizer are stuck forever until one is captured. Note that it's still + the case if all chameleons disappeared. +

+
+ +
+

Capturing moves

+

+ Easy case first: the king captures as usual, by moving onto an adjacent + square occupied by an enemy piece. But this is the only piece following + orthodox rules, and also the only one which captures by moving onto an + occupied square. All other pieces capture passively: they land on a free + square and captured units are determined by some characteristics of the + movement. +

+

Note: the immobilizer does not capture.

+ +

Pawns/Pincers

+

+ If at the end of its movement a pawn is horizontally or vertically adjacent + to an enemy piece, which itself is next to a friendly piece (in the same + direction), the "pinced" unit is removed from the board. +

+
+
+
+
1.Pc2c4 captures both coordinator and long leaper.
+
+ +

Coordinators (rooks)

+

+ Imagine that rook and king of the same color are two corners of a rectangle + (this works if these two pieces are unaligned). + If at the end of a rook move an enemy piece stands in any of the two + remaining corners, it is captured. +

+
+
+
+
1.Rc5 captures on c7 and h5.
+
+ +

Long leapers (knights)

+

+ A knight captures exactly as a queen in international draughts game: by + jumping over its enemies, as many times as it can/want but always in the + same direction. In this respect it is less powerful than a draughts' queen: + on the following diagram c8 or f6 cannot be captured. + However, the knight does not have to maximize the number of captured units + (as is the case in draughts). +

+
+
+
+
All marked squares captures are playable from d2.
+
+ +

Withdrawer (queen)

+

+ The queen captures by moving away from an adjacent enemy piece, in the + opposite direction (without jumping, the path must be free). +

+
+
+
+
1.Qa5, 1.Qb5 or 1.Qc5 captures the black rook.
+
+ +

Chameleon (bishop)

+

The chameleon captures pieces in the way they would capture. So, it

+
    +
  • pinces pawns (if moving like a pawn),
  • +
  • withdraws from withdrawers,
  • +
  • leaps over long leapers,
  • +
  • coordinates coordinators.
  • +
+

...and these captures can be combined.

+

+ Remark: the move indicated on the diagram doesn't capture the black pincer + on e5, since it is a diagonal move (not like a pawn). +

+
+
+
+
1.Bd5 captures the two marked pieces.
+
+

+ Besides, chameleon immobilizes immobilizers (but cannot capture them since + they do not capture). +

+

+ A chameleon captures the king in the same way the king captures, which + means that a chameleon adjacent to a king gives check. +

+
+ +
+

End of the game

+

+ The game ends by checkmate or stalemate as in standard chess. Note however + that checks are more difficult to see, because of the exotic capturing + rules. For example, on the following diagram the white king cannot move to + e5 because then the black pawn could capture by moving next to it. +

+
+
+
+
1.Ke5 is impossible
+
+
+ +
+

More information

+

+ The + Wikipedia page + is a good starting point. +

+
+ +
+ + + + + diff --git a/variants/Baroque/rules.html b/variants/Baroque/rules.html index c65158e..0e30307 100644 --- a/variants/Baroque/rules.html +++ b/variants/Baroque/rules.html @@ -1 +1,13 @@ -

TODO

+

+ Pawns move like rooks, and all other pieces move like a queen + (king excepted). Pieces (king excepted) capture in unusual ways: + please refer to the complete rules below. +

+ +

The goal is still to checkmate.

+ + + Full rules description. + + +

Robert Abbott (1963).

diff --git a/variants/Berolina/class.js b/variants/Berolina/class.js new file mode 100644 index 0000000..fdca8fb --- /dev/null +++ b/variants/Berolina/class.js @@ -0,0 +1,25 @@ +import ChessRules from "/base_rules.js"; + +export default class BerolinaRules extends ChessRules { + +//TODO: Berolina pawns in Utils, also captures for Baroque+Fugue+... + + pieces(color, x, y) { + const pawnShift = (color == "w" ? -1 : 1); + let res = super.pieces(color, x, y); + res['p'].moves = [ + { + steps: [[pawnShift, 1], [pawnShift, -1]], + range: 1 + } + ]; + res['p'].attack = [ + { + steps: [[pawnShift, 0]], + range: 1 + } + ]; + return res; + } + +}; -- 2.44.0