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
You can get just the legal moves which are captures so why not for checks as well? It would be a lot better than having to do the following code:
Move[] legalMoves = board.GetLegalMoves();
foreach (Move move in legalMoves)
{
board.MakeMove(move);
if (move.IsCapture||board.IsInCheck())
{
code
}
else board.UndoMove(move);
}
The text was updated successfully, but these errors were encountered:
You can get just the legal moves which are captures so why not for checks as well? It would be a lot better than having to do the following code:
Move[] legalMoves = board.GetLegalMoves();
foreach (Move move in legalMoves)
{
board.MakeMove(move);
if (move.IsCapture||board.IsInCheck())
{
code
}
else board.UndoMove(move);
}
The text was updated successfully, but these errors were encountered: