checkpoint

This commit is contained in:
2024-11-16 12:37:56 -06:00
parent 13e79eb490
commit 460dfd608e
10 changed files with 139 additions and 49 deletions

View File

@@ -136,17 +136,17 @@
}
}
void OnClickHand(Piece piece)
void OnClickHand(WhichPiece piece)
{
if (showPromotePrompt) return;
// Prevent selecting from both the hand and the board.
selectedBoardPosition = null;
selectedPieceFromHand = piece.WhichPiece == selectedPieceFromHand
selectedPieceFromHand = piece== selectedPieceFromHand
// Deselecting the already-selected piece
? selectedPieceFromHand = null
: selectedPieceFromHand = piece.WhichPiece;
: selectedPieceFromHand = piece;
StateHasChanged();
}