💡📝H. G. Muller wrote on Fri, Oct 7, 2022 02:00 PM UTC:
I have started implementing a new feature of the Interactive Diagram, which I had already proposed a long time ago:
making it generate a text description of the moves.
A table with these descriptions can be made to appear anywhere on the page containing the Diagram as a 'satellite':
one has to embed an empty table with id 'pieceDescriptions' in the HTML text of the page,
like <table id="pieceDescriptors"></table> .
The Diagram script will then locate this element when the page is loaded,
and will attempt to translate the XBetza move descriptors into plain English text.
Below is an example of how this would look (flush browser cache!):
As you can see the conversion is not perfect; some XBetza descriptions are so complex that they cannot be handled (yet?).
It will probably always remain possible to construct XBetza that is too complex for the converter.
I am still brooding on a method for solving that;
The simplest way would be to always allow the user to override the generated texts
by providing a text of his own for a few selected pieces.
But I must still design a mechanism for communicating such override texts to the Diagram.
I am also still open for suggestions for improving the formulation of the texts for which the conversion in principle does work. (The Betza move descriptors can be seen in the usual piece table that can be opened under the Diagram.)
I have started implementing a new feature of the Interactive Diagram, which I had already proposed a long time ago: making it generate a text description of the moves. A table with these descriptions can be made to appear anywhere on the page containing the Diagram as a 'satellite': one has to embed an empty table with id 'pieceDescriptions' in the HTML text of the page, like <table id="pieceDescriptors"></table> . The Diagram script will then locate this element when the page is loaded, and will attempt to translate the XBetza move descriptors into plain English text. Below is an example of how this would look (flush browser cache!):
Pieces
As you can see the conversion is not perfect; some XBetza descriptions are so complex that they cannot be handled (yet?). It will probably always remain possible to construct XBetza that is too complex for the converter. I am still brooding on a method for solving that; The simplest way would be to always allow the user to override the generated texts by providing a text of his own for a few selected pieces. But I must still design a mechanism for communicating such override texts to the Diagram.
I am also still open for suggestions for improving the formulation of the texts for which the conversion in principle does work. (The Betza move descriptors can be seen in the usual piece table that can be opened under the Diagram.)