-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first working version, by any definition
- Loading branch information
1 parent
5fa1ad8
commit f895aef
Showing
91 changed files
with
4,203 additions
and
936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>SicTransit.Woodpusher.Common</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Serilog" Version="2.12.0" /> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" /> | ||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" /> | ||
<PackageReference Include="Serilog.Sinks.Trace" Version="3.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Model\Model.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using SicTransit.Woodpusher.Model; | ||
|
||
namespace SicTransit.Woodpusher.Common.Interfaces | ||
{ | ||
public interface IEngine | ||
{ | ||
Board Board { get; } | ||
|
||
void Initialize(); | ||
|
||
void Play(Move move); | ||
|
||
void Play(AlgebraicMove algebraicMove); | ||
|
||
AlgebraicMove PlayBestMove(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Serilog; | ||
using Serilog.Events; | ||
using System.Reflection; | ||
|
||
namespace SicTransit.Woodpusher.Common | ||
{ | ||
public static class Logging | ||
{ | ||
public static void EnableLogging(LogEventLevel level = LogEventLevel.Information, bool enableConsole = true) | ||
{ | ||
var logFilename = $"{Assembly.GetCallingAssembly().GetName().Name}.log"; | ||
|
||
var loggerConfiguration = new LoggerConfiguration().MinimumLevel.Debug().Enrich.FromLogContext(); | ||
|
||
if (enableConsole) | ||
{ | ||
loggerConfiguration = loggerConfiguration.WriteTo.Console(level); | ||
} | ||
|
||
Log.Logger = loggerConfiguration | ||
.WriteTo.File(logFilename, LogEventLevel.Information) | ||
.CreateLogger(); | ||
} | ||
|
||
public static void EnableUnitTestLogging(LogEventLevel level = LogEventLevel.Information) | ||
{ | ||
Log.Logger = new LoggerConfiguration() | ||
.MinimumLevel.Information() | ||
.Enrich.FromLogContext() | ||
.WriteTo.Trace(level) | ||
.CreateLogger(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>SicTransit.Woodpusher.Tests</RootNamespace> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" /> | ||
<PackageReference Include="coverlet.collector" Version="3.1.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Common\Common.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace SicTransit.Woodpusher.Engine | ||
{ | ||
internal class EvaluationProgress | ||
{ | ||
public int NodeCount { get; set; } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.