Skip to content

Commit

Permalink
fix: di not working
Browse files Browse the repository at this point in the history
  • Loading branch information
chijason99 committed Feb 18, 2025
1 parent d33ab9b commit 69e71ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,10 @@ string translatedMove = moveTranslationService.TranslateMove(game.MoveHistory[0]

## Release Notes

Version 2.1.0
- Fix the issue where the `AddXiangqiCore` extension method throws an error
- Improve the memory performance when validating the moves

Version 2.0.1

Bug Fixes:
Expand Down
3 changes: 0 additions & 3 deletions XiangqiCore/Extension/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public static IServiceCollection AddXiangqiCore(this IServiceCollection services
services.AddScoped<IGifGenerationService, DefaultGifGenerationService>();
services.AddScoped<IPgnSavingService, DefaultPgnSavingService>();

services.AddScoped<IMoveCommand, NotationMoveCommand>();
services.AddScoped<IMoveCommand, CoordinateMoveCommand>();

services.AddScoped<IXiangqiBuilder, XiangqiBuilder>();

return services;
Expand Down
5 changes: 5 additions & 0 deletions XiangqiCore/Game/XiangqiBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public XiangqiBuilder()
{
}

public XiangqiBuilder(IMoveParsingService moveParsingService)
{
_moveParsingService = moveParsingService;
}

/// <summary>
/// Sets the Xiangqi game configuration to the default starting position.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion XiangqiCore/XiangqiCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/chijason99/Xiangqi-Core</RepositoryUrl>
<PackageTags>xiangqi;chinese chess</PackageTags>
<Version>2.0.1</Version>
<Version>2.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 69e71ee

Please sign in to comment.