Check out Grant Acedrex, our featured variant for April, 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]
📝Michel Gutierrez wrote on Sun, Apr 10, 2016 05:23 PM UTC:
<p>Ok, i can see in the code why disabling regular castle also prevents extra castle. In the extra castle move generation, we first search for a regular castle move (which ensures king and rook haven't moved and there are only empty squares between them) before generating extra castle moves. If no regular castle, there is no extra castle.<p> <p>Another approach would be to keep the regular + truncated extra method, but change the UI (by overwriting the view js file like you did for the model) to always highlight the king target square and not the rook in case of a castle. In your <code>grotesque-custom-view.js</code> file, copy function <code>View.Board.xdInput</code> from <code>base-view.js</code>, and replace the line:<p> <p><code>var target = move.cg===undefined?move.t:move.cg;</code></p> <p>by</p> <p><code>var target = move.t;</code></p> <p>This has reasonable chances to work.</p>