Skip to content

Commit

Permalink
merge {gamma-delta:prs/move-utils-into-api}: Fix for SebLague#178
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorA29 committed Aug 17, 2023
1 parent 6003784 commit 76ed903
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Chess-Challenge/src/API/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace ChessChallenge.API

public sealed class Board
{
readonly Chess.Board board;
readonly internal Chess.Board board;
readonly APIMoveGen moveGen;
readonly RepetitionTable repetitionTable;

Expand Down
4 changes: 4 additions & 0 deletions Chess-Challenge/src/API/Move.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public override string ToString()
return $"Move: '{moveName}'";
}

public string GetSAN(Board board) {
return MoveUtility.GetMoveNameSAN(this.move, board.board);
}

/// <summary>
/// Tests if two moves are the same.
/// This is true if they move to/from the same square, and move/capture/promote the same piece type
Expand Down

0 comments on commit 76ed903

Please sign in to comment.