How to call shat2diag2
At two levels deep, use shat2diag2:
One can also explicitly give the path to the collection of pictures that one wants to use. This allows also to use the tool with different sets of pictures, (when such are made.) In this case, use shat2diag, and give the path in the second argument: end with a /. As the pictures from www.chessvariants.com/gif are standard used, the following has the same effect as shat2diag1:
shat-stringsIn a shat-string, you describe the position rowwise, from top to bottom, from left to right. You can use:
- Upper case characters for white pieces: K for white king, Q for white queen, B for white bishop, N for white kNight, R for white rook, P for white pawn.
- Lower case characters for black pieces: k, q, b, n, r, p for black king, queen, bishop, knight, rook, and pawn.
- A number for one or more empty squares: 1: one empty square; 8: eight empty squares, 12 for twelve empty squares in one row.
- A slash / to mark the end of a row.
- A dot . for one empty square.
- A - for denoting a square that is not there. This is for chess variants with boards that are not a rectangle.
- A name between ( ) to denote a piece with a longer name. See an overview of the type of pieces there are. A white piece starts with an upper case letter; a black piece with a smaller case letter. E.g.: (Airplane) or (airplane).
- Some pieces have rotated forms; an r is added for each 90 degree rotation behind the name; use for example (kr), (krr), or (krr) for rotated black kings, (Pr), (Prr), (Prrr) for rotated white pawns.
Diagrams with marked columns and rowsIt is also possible to mark the columns and rows with numbers and letters. For this one uses shat2diag1b, shat2diag2b, or shat2diagb, i.e., the only change with respect to unlabeled rows and columns is a b at the end of the name of the method called. For example, one can use when `one level deep':
The maximum numbers of rows and columns are around 30, but your diagrams won't look any good anyhow if they are so big.
ConclusionsIn this way, it is relatively simple to include chess variant diagrams into your hmtl-pages without much effort. In case of questions, please contact us. If there is interest in this tool for other websites, please email us. Non-commercial use is free, but do not call the tools on the chessvariants.com site from another site, but let us send you files you can put on your own site. The tool also works with a browser when you view the files at home, i.e., when not connected to the internet, when correctly used.
If one want to use different graphics for the pieces, one needs: for each piece a gif-files, and a gif file for an empty square. All these gif files must have exactly the same number of pixels horizontally and vertically. Email if you want to make such a set of pictures.
Written by Hans Bodlaender
WWW page created: December 10, 2001.