fix: Mirrored board

This commit is contained in:
sigmasternchen 2024-10-31 16:50:18 +01:00
parent 18861302e6
commit 4aace35222

View file

@ -41,7 +41,7 @@ function getImageForPice(Piece $piece): string {
>
<?php
for($rank = $start; $rank != $end; $rank += $dir) {
for($file = $start; $file != $end; $file += $dir) {
for($file = 7-$start; $file != 7-$end; $file -= $dir) {
$position = new Position($file, $rank);
$piece = $game->getPiece($position);
$moves = $piece ? $game->getMovesForPiece($piece) : [];