Skip to content

Commit

Permalink
Fix dev project build and hide warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Dec 15, 2023
1 parent 94daba2 commit 085fbc2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Lynx.Benchmark/Lynx.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<PropertyGroup>
<NoWarn>S125,CA1822,CA1806,RCS1090</NoWarn>
<NoWarn>$(NoWarn),S125,CA1822,CA1806,RCS1090,CS0618</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Lynx.Dev/Lynx.Dev.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<PropertyGroup>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>CS8321,S125,S1481</NoWarn>
<NoWarn>$(NoWarn),CS8321,S125,S1481,CS0618</NoWarn>
</PropertyGroup>

</Project>
8 changes: 6 additions & 2 deletions src/Lynx.Dev/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -669,19 +669,23 @@ static void _54_ScoreMove()

var engine = new Engine(Channel.CreateBounded<string>(new BoundedChannelOptions(100) { SingleReader = true, SingleWriter = false }));
engine.SetGame(new(position));
foreach (var move in MoveGenerator.GenerateAllMoves(position, capturesOnly: true))
#pragma warning disable CS0618 // Type or member is obsolete
foreach (var move in MoveGenerator.GenerateAllCaptures(position))
{
Console.WriteLine($"{move} {engine.ScoreMove(move, default, default)}");
}
#pragma warning restore CS0618 // Type or member is obsolete

position = new Position(TrickyPosition);
position.Print();

engine.SetGame(new(position));
foreach (var move in MoveGenerator.GenerateAllMoves(position, capturesOnly: true))
#pragma warning disable CS0618 // Type or member is obsolete
foreach (var move in MoveGenerator.GenerateAllCaptures(position))
{
Console.WriteLine($"{move} {engine.ScoreMove(move, default, default)}");
}
#pragma warning restore CS0618 // Type or member is obsolete
}

static void ZobristTable()
Expand Down

0 comments on commit 085fbc2

Please sign in to comment.