Skip to content

Commit

Permalink
Merge branch 'refactor/tm-outside-of-engine' into refactor/tt-outside…
Browse files Browse the repository at this point in the history
…-of-engine-2-class-wrapper-after-bugfix
  • Loading branch information
eduherminio authored Nov 19, 2024
2 parents 6820077 + 5113da9 commit 21b3cbc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Lynx/Model/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void UpdateInitialPosition()

public void FreeResources()
{
ArrayPool<PlyStackEntry>.Shared.Return(_gameStack);
ArrayPool<PlyStackEntry>.Shared.Return(_gameStack, clearArray: true);
ArrayPool<ulong>.Shared.Return(_positionHashHistory);

CurrentPosition.FreeResources();
Expand Down
4 changes: 2 additions & 2 deletions src/Lynx/Searcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ public Searcher(ChannelReader<string> uciReader, ChannelWriter<object> engineWri
_engineWriter = engineWriter;

_tt = new TranspositionTable();
_logger = LogManager.GetCurrentClassLogger();
Engine = new Engine(_engineWriter, _tt);

_logger = LogManager.GetCurrentClassLogger();
}

public Engine Engine { get; }
Expand Down Expand Up @@ -57,7 +58,6 @@ public async Task Run(CancellationToken cancellationToken)
private void OnGoCommand(GoCommand goCommand)
{
var searchConstraints = TimeManager.CalculateTimeManagement(Engine.Game, goCommand);

var searchResult = Engine.Search(goCommand, searchConstraints);

if (searchResult is not null)
Expand Down
2 changes: 1 addition & 1 deletion tests/Lynx.Generator.Test/Lynx.Generator.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
Expand Down
2 changes: 1 addition & 1 deletion tests/Lynx.Test/Lynx.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="NUnit" Version="4.2.2" />
<!--<PackageReference Include="NUnit.Analyzers" Version="4.3.0" />-->
Expand Down

0 comments on commit 21b3cbc

Please sign in to comment.