The Chess Variant Pages
Custom Search




[ 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

This item is a miscellaneous item
It belongs to categories: Orthodox chess, 
It was last modified on: 2015-12-11
 Author: Fergus  Duniho. Home page of The Chess Variant Pages. Missing description[All Comments] [Add Comment or Rating]
Fergus Duniho wrote on 2021-05-25 UTC

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"
);