Yep
This commit is contained in:
@@ -147,7 +147,7 @@ namespace Shogi.Domain.ValueObjects
|
||||
|
||||
var paths = boardState[kingPosition]!.MoveSet;
|
||||
return paths
|
||||
.Select(path => path.NormalizedDirection + kingPosition)
|
||||
.Select(path => path.Step + kingPosition)
|
||||
// Because the king could be on the edge of the board, where some of its paths do not make sense.
|
||||
.Where(newPosition => newPosition.IsInsideBoardBoundary())
|
||||
// Where tile at position is empty, meaning the king could move there.
|
||||
|
||||
Reference in New Issue
Block a user