You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Re1" and "Ree1" are generated as san moves in the following test. Should be "Rae1" and "Ree1". I'm pretty sure this is related to pinned pieces, it thinks the Rook on e5 is pinned when generating Disambiguations. (It is actually a pinner of the Black king)
[Fact]
public void RookSanAmbiguity_a1e5()
{
// Tests rook ambiguity notation for white rooks @ a1 and e5.
const string fen = "4k2r/r3bppp/p1p5/3pR3/Pp1P1B2/7P/1PP2PP1/R5K1 w k - 0 37";
const MoveNotations notation = MoveNotations.San;
var expectedNotations = new[] { "Rae1", "Ree1" };
var game = GameFactory.Create(fen);
var sideToMove = game.Pos.SideToMove;
var targetPiece = PieceTypes.Rook.MakePiece(sideToMove);
var moveNotation = MoveNotation.Create(game.Pos);
var sanMoves = game.Pos
.GenerateMoves()
.Select(static em => em.Move)
.Where(m => game.Pos.GetPiece(m.FromSquare()) == targetPiece)
.Select(m => moveNotation.ToNotation(notation).Convert(m))
.ToArray();
foreach (var notationResult in expectedNotations)
Assert.Contains(sanMoves, s => s == notationResult);
}
The text was updated successfully, but these errors were encountered:
"Re1" and "Ree1" are generated as san moves in the following test. Should be "Rae1" and "Ree1". I'm pretty sure this is related to pinned pieces, it thinks the Rook on e5 is pinned when generating Disambiguations. (It is actually a pinner of the Black king)
[Fact]
public void RookSanAmbiguity_a1e5()
{
// Tests rook ambiguity notation for white rooks @ a1 and e5.
const string fen = "4k2r/r3bppp/p1p5/3pR3/Pp1P1B2/7P/1PP2PP1/R5K1 w k - 0 37";
const MoveNotations notation = MoveNotations.San;
var expectedNotations = new[] { "Rae1", "Ree1" };
The text was updated successfully, but these errors were encountered: