Check out Atomic Chess, our featured variant for November, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Chess. Play Chess with Jocly.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Apr 7, 2016 07:10 PM UTC:
<P>Michel,</P> <P>Is there any way to handle multiple castling options on each side? I am trying to program <A HREF="/play/jocly/grotesque.html">Grotesque Chess</A>, but I can't get the castling to work right.</P> <P>This didn't work at all:</P> <PRE> castle: { "4/1": {k:[3,2,1],r:[1,2],n:"Kb1"}, "4/2": {k:[3,2],r:[1,2,3],n:"Kc1"}, "4/6": {k:[5,6],r:[8,7,6,5],n:"Kg1"}, "4/7": {k:[5,6,7],r:[8,7,6],n:"Kh1"}, "4/8": {k:[5,6,7,8],r:[8,7],n:"Ki1"}, "74/72": {k:[73,72,71],r:[71,72],n:"Kb8"}, "74/73": {k:[73,72],r:[71,72,73],n:"Kc8"}, "74/76": {k:[75,76],r:[78,77,76,75],n:"Kg8"}, "74/77": {k:[75,76,77],r:[78,77,76],n:"Kh8"}, "74/78": {k:[75,76,77,78],r:[78,77],n:"Ki8"}, }, </PRE> <P>This works only for the last one assigned to an initial value. So, for example, castling white King-side moves the King to i1 and the Rook to h1 without providing any options.</P> <PRE> castle: { "4/0": {k:[3,2,1],r:[1,2],n:"Kb1"}, "4/0": {k:[3,2],r:[1,2,3],n:"Kc1"}, "4/9": {k:[5,6],r:[8,7,6,5],n:"Kg1"}, "4/9": {k:[5,6,7],r:[8,7,6],n:"Kh1"}, "4/9": {k:[5,6,7,8],r:[8,7],n:"Ki1"}, "74/70": {k:[73,72,71],r:[71,72],n:"Kb8"}, "74/70": {k:[73,72],r:[71,72,73],n:"Kc8"}, "74/79": {k:[75,76],r:[78,77,76,75],n:"Kg8"}, "74/79": {k:[75,76,77],r:[78,77,76],n:"Kh8"}, "74/79": {k:[75,76,77,78],r:[78,77],n:"Ki8"}, }, </PRE>