This commit is contained in:
2021-12-22 17:43:32 -06:00
parent aa4d5120e4
commit a2f3abb94e
14 changed files with 1096 additions and 212 deletions

View File

@@ -13,15 +13,15 @@ namespace Shogi.Domain
/// <summary>
/// Key is position notation, such as "E4".
/// </summary>
private Dictionary<string, Piece?> board;
private readonly Dictionary<string, Piece?> board;
public List<Piece> Hand => WhoseTurn == WhichPlayer.Player1 ? Player1Hand : Player2Hand;
public List<Piece> Player1Hand { get; }
public List<Piece> Player2Hand { get; }
public List<Move> MoveHistory { get; }
public WhichPlayer WhoseTurn => MoveHistory.Count % 2 == 0 ? WhichPlayer.Player1 : WhichPlayer.Player2;
public WhichPlayer? InCheck { get; private set; }
public bool IsCheckmate { get; private set; }
public WhichPlayer? InCheck { get; set; }
public bool IsCheckmate { get; set; }
public ShogiBoardState()
{