Fix: Rooks going up didn't consider the topleft square
parent
49d8d675d4
commit
943aab1a14
|
|
@ -203,7 +203,7 @@ class _LegalMovesBlack {
|
|||
// up
|
||||
bool hasEncounteredPiece = false;
|
||||
int j = i-8;
|
||||
while (!hasEncounteredPiece && j > 0) {
|
||||
while (!hasEncounteredPiece && j >= 0) {
|
||||
if (Piece.emptySquare == position.board[j]) {
|
||||
yield ("${Position.squareIndexToString(i)}${Position.squareIndexToString(j)}", Position.from(position)..playMoveIndices(i, j));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ class _LegalMovesWhite {
|
|||
// up
|
||||
bool hasEncounteredPiece = false;
|
||||
int j = i-8;
|
||||
while (!hasEncounteredPiece && j > 0) {
|
||||
while (!hasEncounteredPiece && j >= 0) {
|
||||
if (Piece.emptySquare == position.board[j]) {
|
||||
yield ("${Position.squareIndexToString(i)}${Position.squareIndexToString(j)}", Position.from(position)..playMoveIndices(i, j));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue