Click here to open/close a piece overview. Play it!
The AI will now respond to your moves! ( + 2.5 ply - )
Info for selected board piece
mc
Move or capture
mc
Move or capture (unblockable jump)
m
Move only
im
Move only (unmoved piece only)
c
Capture only
m,c
Forbidden move, but delivers check
?
p,g
Hop target (hover/touch for actual move)
Click on piece to toggle its moved status
Click on piece name to see its move diagram. (print version)
ID
white
nr
black
nr
name
move
P
-
-
pawn
fW
Q
-
-
pawn (passed)
fsW
A
-
-
advisor
F
E
-
-
elephant
afF
H
-
-
horse
afsW
C
-
-
cannon
mRcpR
R
-
-
rook
R
K
-
-
king
WfafyafcW
Xiangqi
The question came up whether interactive diagrams could handle a zonal board like that of Xiangqi. The answer is 'yes', but not without adding a tiny bit of script next to the regular specification of the diagram, to specify which pieces cannot go where. To demonstrate that, I posted the diagram on the left.
Click below to display piece moves:
Pawn
Pawn (passed)
Advisor (d1,f1; d10,f10)
Elephant (c1,g1; c10,g10)
Horse (b1,h1; b10,h10)
Cannon (b3,h3; b8,h8)
Rook (a1,i1; a10,i10)
King (e1; e10)
The part I am not very happy about is the description of the non-facing rule for the Kings in Betza notation, though. For clarity this should have been fcR, where the zonal restriction of the King would suppress everything outside the Palace, but can make an exception for moves that land on a King. But unfortunately that would leave fD captures inside its own Palace, when the King is on the back rank.
I solved that now by defining the forward slide as starting with a lame leap of 3 squares (to make sure the King gets out of its own Palace) before sliding as a Rook for the remaining part of the path. This leads to an ugly multi-leg description, first two move-only Wazir steps, and then a range-toggle ('y') to turn the Wazir atom into a Rook. It would have been nice if there had been a Betza modifier 'k' to indicate 'capture king only'. Then the move could have been written as fkR. But this is a very exceptional case, and it is probably not wise to dedicate one of the few still available letters for such an uncommon task. Perhaps it would be better to allow diacritical markings to commonly used modifiers to indicate they are somehow restricted. Like c" for 'capture, but only royals', and p' for 'must hop, but not over enemy pieces'. The full Xiangqi King move would then be Wfc"R.
Extra scripting
To get the above result two JavaScript functions that the general diagram script optionally uses had to be supplied:
BadZone(x,y,piece,color) to confine pieces to a limited part of the board
Shade(x,y) to define a board coloration different from the normal checkering
Both these functions are expected to return 0 or 1, in the latter case to indicate whether squares are dark or light, in the former case whether the piece is not allowed at the given location.
Interactive diagram: pieces movable, right-click resets!
Click here to open/close a piece overview. Play it!
Xiangqi
The question came up whether interactive diagrams could handle a zonal board like that of Xiangqi. The answer is 'yes', but not without adding a tiny bit of script next to the regular specification of the diagram, to specify which pieces cannot go where. To demonstrate that, I posted the diagram on the left.
The part I am not very happy about is the description of the non-facing rule for the Kings in Betza notation, though. For clarity this should have been fcR, where the zonal restriction of the King would suppress everything outside the Palace, but can make an exception for moves that land on a King. But unfortunately that would leave fD captures inside its own Palace, when the King is on the back rank.
I solved that now by defining the forward slide as starting with a lame leap of 3 squares (to make sure the King gets out of its own Palace) before sliding as a Rook for the remaining part of the path. This leads to an ugly multi-leg description, first two move-only Wazir steps, and then a range-toggle ('y') to turn the Wazir atom into a Rook. It would have been nice if there had been a Betza modifier 'k' to indicate 'capture king only'. Then the move could have been written as fkR. But this is a very exceptional case, and it is probably not wise to dedicate one of the few still available letters for such an uncommon task. Perhaps it would be better to allow diacritical markings to commonly used modifiers to indicate they are somehow restricted. Like c" for 'capture, but only royals', and p' for 'must hop, but not over enemy pieces'. The full Xiangqi King move would then be Wfc"R.
Extra scripting
To get the above result two JavaScript functions that the general diagram script optionally uses had to be supplied:
Both these functions are expected to return 0 or 1, in the latter case to indicate whether squares are dark or light, in the former case whether the piece is not allowed at the given location.