Files
Shogi/Shogi.UI/Pages/Play/GameBoard/PlayerName.razor
2024-10-28 21:01:44 -05:00

30 lines
592 B
Plaintext

<p style="margin: 0">
@if (IsTurn)
{
<span class="turn-marker" title="Shows which player is next to move a piece.">Turn</span>
<span>&nbsp;</span>
}
@if (InCheck)
{
<span class="check-marker" title="King is in danger!">Check</span>
<span>&nbsp;</span>
}
@if (string.IsNullOrEmpty(Name))
{
<span>Empty Seat</span>
}
else
{
<span>@Name</span>
}
</p>
@code {
[Parameter][EditorRequired] public bool IsTurn { get; set; }
[Parameter][EditorRequired] public bool InCheck { get; set; }
[Parameter][EditorRequired] public string Name { get; set; } = string.Empty;
}