Skip to content

Commit 76ed903

Browse files
committed
merge {gamma-delta:prs/move-utils-into-api}: Fix for SebLague#178
1 parent 6003784 commit 76ed903

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Chess-Challenge/src/API/Board.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace ChessChallenge.API
99

1010
public sealed class Board
1111
{
12-
readonly Chess.Board board;
12+
readonly internal Chess.Board board;
1313
readonly APIMoveGen moveGen;
1414
readonly RepetitionTable repetitionTable;
1515

Chess-Challenge/src/API/Move.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public override string ToString()
5959
return $"Move: '{moveName}'";
6060
}
6161

62+
public string GetSAN(Board board) {
63+
return MoveUtility.GetMoveNameSAN(this.move, board.board);
64+
}
65+
6266
/// <summary>
6367
/// Tests if two moves are the same.
6468
/// This is true if they move to/from the same square, and move/capture/promote the same piece type

0 commit comments

Comments
 (0)