Skip to content

Commit

Permalink
fix: don't cache moves
Browse files Browse the repository at this point in the history
  • Loading branch information
znxftw committed Dec 3, 2024
1 parent b366b93 commit 55ce9ac
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Rudim/Board/BoardState.Moves.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ public partial class BoardState

public void GenerateMoves()
{
ulong boardHash = GetBoardHash();

if (MoveCache.TryGetValue(boardHash, out var cachedMoves))
{
Moves = cachedMoves;
return;
}

Moves.Clear();

GeneratePawnMoves();
Expand All @@ -29,8 +21,6 @@ public void GenerateMoves()
GenerateRookMoves();
GenerateQueenMoves();
GenerateKingMoves();

MoveCache[boardHash] = new List<Move>(Moves);
}

private void GenerateKingMoves()
Expand Down

0 comments on commit 55ce9ac

Please sign in to comment.