Check out Symmetric Chess, our featured variant for March, 2024.


[ 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

Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, May 25, 2021 07:20 PM UTC in reply to A. M. DeWitt from Wed May 19 10:09 PM:

I wonder if there is an option in Game Courier somewhere to have pieces rotate 180 degrees when the board is flipped?

There is no option for rotating piece images.

This is not the $flip variable in the set file, as that swaps the values for lowercase and uppercase keys when the board is flipped

That is not quite what it does. What is actually does is use the piece images in the $flipped array instead of those in the $pieces array. In case any piece labels have not been assigned to piece images in the $flipped array, it completes the $flipped array with this code:

if ($flip == true) {
    foreach ($pieces as $key => $val) {
        if (empty($flipped[$key]))
            $flipped[$key] = $pieces[flipcase($key)];
    }
}

This is useful for Shogi variants, in which the pieces on one side are usually 180° rotated images of the pieces on the other side. Note that some Shogi sets assign specific images to k and K for $flipped, because each side uses a different Kanji character for the piece, and they use the default values for the rest. Here's an example of such code:

$flipped = array (
    "K" => "WKing.gif", "k" => "flip/BKing.gif"
);