Allow unauthorized users to search and spectate.
This commit is contained in:
@@ -115,23 +115,19 @@
|
||||
{
|
||||
var pieceBeingMoved = Session.BoardState.Board[selectedBoardPosition];
|
||||
var isPromotedAlready = pieceBeingMoved != null && pieceBeingMoved.IsPromoted;
|
||||
Console.WriteLine("Is promoted? {0}", isPromotedAlready);
|
||||
// Moving to an empty space or capturing an opponent's piece.
|
||||
if (!isPromotedAlready && (IsWithinPromoteArea(position) || IsWithinPromoteArea(selectedBoardPosition)))
|
||||
{
|
||||
Console.WriteLine("Prompt!");
|
||||
moveTo = position;
|
||||
showPromotePrompt = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var success = await ShogiApi.Move(Session.SessionId, new MovePieceCommand(selectedBoardPosition, position, false));
|
||||
Console.WriteLine("Success? {0}", success);
|
||||
if (!success)
|
||||
{
|
||||
selectedBoardPosition = null;
|
||||
showError = true;
|
||||
Console.WriteLine("Show error");
|
||||
}
|
||||
}
|
||||
StateHasChanged();
|
||||
|
||||
Reference in New Issue
Block a user