ianfab / fairyground

playground for Fairy-Stockfish in the browser
https://fairyground.vercel.app/
GNU General Public License v3.0
20 stars 5 forks source link

Custom King Movements #8

Closed DSARichard closed 2 years ago

DSARichard commented 2 years ago

From what I have read, this is how we are supposed to create a custom king:

# You can define custom king movements in the same way you can define another custom piece.
# E.g., to make the king move like a centaur:
# king = k:KN

However, the king still moves like a king:

[avariant]
pieceToCharTable = RKrk
rook = r
king = k:KN
startFen = 4k3/8/8/8/8/8/R7/4K3 w - - 0 1

Am I doing something wrong? Or, may I ask, is this a legit issue?

ianfab commented 2 years ago

Works fine for me, maybe you are using an older version?

 +---+---+---+---+---+---+---+---+
 |   |   |   |   | k |   |   |   |8  
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |7
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |6
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |5
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |4
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |3
 +---+---+---+---+---+---+---+---+
 | R |   |   |   |   |   |   |   |2
 +---+---+---+---+---+---+---+---+
 |   |   |   |   | K |   |   |   |1 *
 +---+---+---+---+---+---+---+---+
   a   b   c   d   e   f   g   h

Fen: 4k3/8/8/8/8/8/R7/4K3 w - - 0 1
Sfen: 4k3/8/8/8/8/8/R7/4K3 b - 1
Key: 0D54C166C648EBEC
Checkers: 
Chased: 
go perft 1
a2a1: 1
a2b2: 1
a2c2: 1
a2d2: 1
a2e2: 1
a2f2: 1
a2g2: 1
a2h2: 1
a2a3: 1
a2a4: 1
a2a5: 1
a2a6: 1
a2a7: 1
a2a8: 1
e1d1: 1
e1f1: 1
e1c2: 1
e1d2: 1
e1e2: 1
e1f2: 1
e1g2: 1
e1d3: 1
e1f3: 1

Nodes searched: 23
DSARichard commented 2 years ago

image well, this is what i am seeing...