Some analyzer code style changes

This commit is contained in:
Asriel Camora
2023-06-19 10:03:57 -07:00
parent 6d61e022b6
commit 05ead22448
50 changed files with 134 additions and 56 deletions
+7
View File
@@ -6,6 +6,13 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.61">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Simulator\Craftimizer.Simulator.csproj" />
</ItemGroup>
+1 -1
View File
@@ -7,7 +7,7 @@ namespace Craftimizer.Solver.Crafty;
public sealed class ActionSet
{
private uint Bits { get; set; } = 0;
private uint Bits { get; set; }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static int NthBitSet(uint value, int n)
+4 -4
View File
@@ -1,8 +1,8 @@
namespace Craftimizer.Solver.Crafty;
public class NodeScores
public sealed class NodeScores
{
public float ScoreSum { get; set; } = 0;
public float MaxScore { get; set; } = 0;
public float Visits { get; set; } = 0;
public float ScoreSum { get; set; }
public float MaxScore { get; set; }
public float Visits { get; set; }
}
+3
View File
@@ -1,5 +1,6 @@
using Craftimizer.Simulator;
using Craftimizer.Simulator.Actions;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace Craftimizer.Solver.Crafty;
@@ -213,6 +214,7 @@ public class Solver
return (actions, state);
}
Debugger.Break();
var solver = new Solver(state, true);
while (!solver.Simulator.IsComplete)
{
@@ -232,6 +234,7 @@ public class Solver
solver = new Solver(state, true);
}
Debugger.Break();
return (actions, state);
}