Skip to content

Commit

Permalink
Fix piece number in moving phase
Browse files Browse the repository at this point in the history
  • Loading branch information
calcitem committed May 1, 2024
1 parent 02aa4ef commit 4c37313
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,10 @@ class Position {
_grid[squareToIndex[_currentSquare]!] = PieceColor.none;

_currentSquare = s;

// Set square number
sqAttrList[s].placedPieceNumber = placedPieceNumber;

final int n = _millsCount(_currentSquare);

if (n == 0) {
Expand Down Expand Up @@ -918,6 +922,9 @@ class Position {
action = Act.place;
GameController().gameInstance.blurIndex = squareToIndex[sq];

// Set square number
placedPieceNumber = sqAttrList[sq].placedPieceNumber;

return const GameResponseOK();
}

Expand Down

0 comments on commit 4c37313

Please sign in to comment.