Check out McCooey's Hexagonal Chess, our featured variant for May, 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

Play-test applet for chess variants. (Updated!) Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Sat, Jun 14 10:57 AM UTC in reply to Qmz Rgszmz from 08:29 AM:

You have to specify promoOffset=N, with a number N. And you define the pieces in such an order that the promoted version of each piece is N places later in the table.

E.g. for regular Shogi you would define pieces in the order Pawn, Lance, Knight, Bishop, Rook, Silver, Gold, Tokin, GoldLance, GoldKnight, DragonHorse, DragonKing, GoldSilver, King. The first 6 of these promote, so you would set maxPromote=6. The first piece (Pawn) promotes to the 8th piece (Tokin), so you have to add 7 to the piece number, and set promoOffset=7. From Tokin on the order of the pieces has to match that of the first seven. The Diagram won't be smart enough to realize that you cannot defer promotion of a Pawn or Lance on last rank, though.

Now that the Interactive Diagram supports general morphing there is an alternative way to do this: you can set maxPromote=0, so that no piece would promote 'by itself'. For each type you can the specify a morph board, to indicate how it must promote per square. For instance, directly below the line that defined the Pawn you would put a morph like:

pawn:P:fW:chinesepawn:a3-i3
morph=T/|/|

The morph value is shorthand for TTTTTTTTT/|||||||||/|||||||||/........./........./........./........./........./........./......... , which is a board image where the ranks are separated by slashes /. This orders mandatory promotion to T (= Tokin) on the 9th rank, while the | means optional Shogi promotion, i.e. according to promoOffset, on ranks 7 and 8. If you rather represent a Tokin by the ID +P, you would write morph=+P,+P/|/| . (Multi-character IDs have to be separated by commas.)