mirror of
https://github.com/sigmasternchen/php-chess
synced 2025-03-14 23:58:53 +00:00
fix: ranks and files swapped in visualisation
This commit is contained in:
parent
73b090e9b7
commit
e965c8b5af
1 changed files with 1 additions and 1 deletions
|
@ -279,7 +279,7 @@ class Game {
|
|||
$color = ($rank % 2) ^ ($file % 2);
|
||||
$result .= "\033[" . ($color ? 47 : 100) . "m";
|
||||
|
||||
$piece = current(array_filter($this->pieces, fn($p) => $p->getPosition()->equals(new Position($rank, $file))));
|
||||
$piece = current(array_filter($this->pieces, fn($p) => $p->getPosition()->equals(new Position($file, $rank))));
|
||||
if ($piece) {
|
||||
if ($piece->getSide() == Side::WHITE) {
|
||||
$result .= "\033[97m";
|
||||
|
|
Loading…
Reference in a new issue