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

Enter Your Reply

The Comment You're Replying To
Michel Gutierrez wrote on Thu, Apr 14, 2016 03:49 PM UTC:
<p>Fergus,</p> <p>I had a quick look at your Cavalier Chess implementation and i saw a problem which is likely to cause the issue you are experiencing.</p> <p>You define a piece type for white cavalier:</p> <p><code> pieceTypes: { 0: { name: 'cavalier-w', aspect: 'fr-knight', graph: Model.Game.cbHorseGraph(geometry), value: 2, abbrev: 'H', initial: [{s:1,p:8},{s:1,p:9},{s:1,p:10},{s:1,p:11},{s:1,p:12},{s:1,p:13},{s:1,p:14},{s:1,p:15},{s:-1,p:48},{s:-1,p:49},{s:-1,p:50},{s:-1,p:51},{s:-1,p:52},{s:-1,p:53},{s:-1,p:54},{s:-1,p:55}], }, </code></p> <p>But you define initial position for both white and black, and you do the same for black cavalier. So basically there are 2 cavaliers at each 2nd second row, causing an exception in the code.</p> <p>I'm not sure about the Cavalier Chess rules but if the movements are the same for both sides, you should only have 1 piece type for the cavalier. If they don't have the same movement (like the regular pawns that go towards different directions), you must have 2 different piece types for black and white but ensure that the initial position is only defined for the corresponding side.</p> <p>Tip: when developing on Jocly, you should always have the browser console opened (F12) so that you can spot quickly when there is something wrong.</p>

Edit Form

Comment on the page Chess

Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Avoid Inflammatory Comments
If you are feeling anger, keep it to yourself until you calm down. Avoid insulting, blaming, or attacking someone you are angry with. Focus criticisms on ideas rather than people, and understand that criticisms of your ideas are not personal attacks and do not justify an inflammatory response.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.