Check out Smess, our featured variant for February, 2025.


[ 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

Interactive diagrams. (Updated!) Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝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!):

satellite=test files=12 ranks=14 symmetry=none holdingsType=1 promoZone=4 promoChoice=!P!X*N*B*L*E*Z*R3*Y3*F3*J3*V2*Q2*U2*I2*M2 graphicsDir=/graphics.dir/alfaerie/ whitePrefix=w blackPrefix=b graphicsType=gif squareSize=54 hole::::a1-l1,,a14-l14 pawn:P:mfW*fceF:pawn:b4-k4,f5,g5,a5,l5,,b11-k11,f10,g10,a10,l10 berolina:X:mfF*fceW:berolinapawn:a4,l4,c5,j5,,a11,l11,c10,j10 king:K:KisO3isO4isjO2isjO3:king:g2,,g13 rook::::a3,l3,b2,k2,,a12,l12,b13,k13:1 queen::::f2,,f13:1 bishop:B:B:bishop:c3,j3,,c12,j12:2 knight:N:NmL:knight:b3,k3,,b12,k12:1 kangaroo:G:HFD:kangaroo:e3,h3,,e12,h12:1 warlock:W:WZ:/graphics.dir/alfaeriemisc/compounds/%zebrawazir:d2,i2,,d13,i13 cannon:Z:mRcpR:cannon:a2,l2,,a13,l13 knightrider:Y:NN:nightrider:c2,j2,,c13,j13:1 osprey:O:DmpafyafsW:bird2:f1,g1,,f14,g14 vulture:F:nFXnNYmH:bird:d3,i3,,d12,i12 joker:J:fI:fool:e1,h1,,e14,h14 Valkyrie:I:BnFXnNYmH:pegasus:f3,,f12 Mortar:M:RpcRF:tank:g3,,g12 Varan:V:RNN:chancellorrider:h2,,h13 Unicorn:U:BNN:cardinalrider:e2,,e13 Gold:::goldgeneral: Silver:::silvergeneral: W::fsWifmA:wazir: Griffon:::gryphon: Bat::jB:halflingbishop: Falcon::nCnZ:falcon: symmetry=mirror shuffle=:B:N:G:F,QVU,IM,:W:Y maxPromote=2 royal=3

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.)