Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Dec 21, 2023
1 parent a9a855a commit 98e756b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Lynx/MoveGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Lynx.Internal;
using Lynx.Model;
using Lynx.Model;
using NLog;
using System.Diagnostics;
using System.Runtime.CompilerServices;
Expand Down Expand Up @@ -184,7 +183,7 @@ internal static void GenerateCastlingMoves(ref int localIndex, Move[] movePool,
{
movePool[localIndex++] = WhiteShortCastle;

Debug.Assert(movePool[localIndex] == MoveExtensions.Encode(Constants.WhiteKingSourceSquare, Constants.WhiteShortCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isShortCastle: TRUE),
Debug.Assert(movePool[localIndex - 1] == MoveExtensions.Encode(Constants.WhiteKingSourceSquare, Constants.WhiteShortCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isShortCastle: TRUE),
"Wrong hardcoded white short castle move");
}

Expand All @@ -198,7 +197,7 @@ internal static void GenerateCastlingMoves(ref int localIndex, Move[] movePool,
{
movePool[localIndex++] = WhiteLongCastle;

Debug.Assert(movePool[localIndex] == MoveExtensions.Encode(Constants.WhiteKingSourceSquare, Constants.WhiteLongCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isLongCastle: TRUE),
Debug.Assert(movePool[localIndex - 1] == MoveExtensions.Encode(Constants.WhiteKingSourceSquare, Constants.WhiteLongCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isLongCastle: TRUE),
"Wrong hardcoded white long castle move");
}
}
Expand All @@ -215,7 +214,7 @@ internal static void GenerateCastlingMoves(ref int localIndex, Move[] movePool,
{
movePool[localIndex++] = BlackShortCastle;

Debug.Assert(movePool[localIndex] == MoveExtensions.Encode(Constants.BlackKingSourceSquare, Constants.BlackShortCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isShortCastle: TRUE),
Debug.Assert(movePool[localIndex - 1] == MoveExtensions.Encode(Constants.BlackKingSourceSquare, Constants.BlackShortCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isShortCastle: TRUE),
"Wrong hardcoded black short castle move");
}

Expand All @@ -229,7 +228,7 @@ internal static void GenerateCastlingMoves(ref int localIndex, Move[] movePool,
{
movePool[localIndex++] = BlackLongCastle;

Debug.Assert(movePool[localIndex] == MoveExtensions.Encode(Constants.BlackKingSourceSquare, Constants.BlackLongCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isLongCastle: TRUE),
Debug.Assert(movePool[localIndex - 1] == MoveExtensions.Encode(Constants.BlackKingSourceSquare, Constants.BlackLongCastleKingSquare, (int)Piece.K + Utils.PieceOffset(position.Side), isLongCastle: TRUE),
"Wrong hardcoded black long castle move");
}
}
Expand Down

0 comments on commit 98e756b

Please sign in to comment.