yep
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
{
|
||||
board.InCheck = null;
|
||||
}
|
||||
board.WhoseTurn = otherPlayer;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Shogi.Domain
|
||||
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 WhoseTurn { get; set; }
|
||||
public WhichPlayer? InCheck { get; set; }
|
||||
public bool IsCheckmate { get; set; }
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Shogi.Domain
|
||||
var fromPiece = board[from];
|
||||
if (fromPiece == null)
|
||||
{
|
||||
return new MoveResult(false, $"Tile [{from}] is empty. There is no piece to move.");
|
||||
return new MoveResult(false, $"Tile [{fromNotation}] is empty. There is no piece to move.");
|
||||
}
|
||||
|
||||
if (fromPiece.Owner != board.WhoseTurn)
|
||||
|
||||
Reference in New Issue
Block a user