Skip to content

Commit

Permalink
Fixed new game restore o start
Browse files Browse the repository at this point in the history
  • Loading branch information
sakya committed Mar 24, 2024
1 parent f8b6b38 commit d8001dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CoreChess/Pages/MainPage.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,11 +1068,12 @@ private async void InitializeWindow(object sender, VisualTreeAttachmentEventArgs
} else {
var engine = App.Settings.GetEngine(p.EngineId) ?? App.Settings.Engines?.FirstOrDefault();;
var enginePlayer =
new EnginePlayer(Game.Colors.Black, engine?.Name, engine?.GetElo())
new EnginePlayer(p.Color!.Value, engine?.Name, p.EngineElo)
{
Engine = engine?.Copy(),
OpeningBookFileName = App.Settings.DefaultOpeningBook
};
enginePlayer.Engine.SetElo(p.EngineElo!.Value);
settings.Players.Add(enginePlayer);
}
}
Expand Down

0 comments on commit d8001dc

Please sign in to comment.