mirror of
https://github.com/sigmasternchen/php-chess
synced 2025-03-15 07:58:54 +00:00
fix: index out of range error in PeSTO heuristic
This commit is contained in:
parent
1722e98ee3
commit
1039ea037f
1 changed files with 1 additions and 1 deletions
|
@ -222,7 +222,7 @@ class PeSTO implements Heuristic {
|
||||||
|
|
||||||
$index = $rank * 8 + $file;
|
$index = $rank * 8 + $file;
|
||||||
if ($piece->getSide() == Side::BLACK) {
|
if ($piece->getSide() == Side::BLACK) {
|
||||||
$index = 64 - $index;
|
$index = 63 - $index;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
Loading…
Reference in a new issue