checkmate complete
This commit is contained in:
@@ -26,6 +26,6 @@ namespace Shogi.Domain.Pieces
|
||||
{
|
||||
}
|
||||
|
||||
public override IEnumerable<Path> MoveSet => Player1Paths;
|
||||
public override IEnumerable<Path> MoveSet => Owner == WhichPlayer.Player1 ? Player1Paths : Player2Paths;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ namespace Shogi.Domain.Pieces
|
||||
{
|
||||
position += path.Direction;
|
||||
steps.Add(position);
|
||||
|
||||
if (path.Distance == Distance.OneStep) break;
|
||||
}
|
||||
|
||||
if (position == end)
|
||||
|
||||
Reference in New Issue
Block a user