Skip to content

Commit

Permalink
Added back in the StatableCore. (Save State service)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommai78101 committed Jul 28, 2022
1 parent 53944a8 commit 68cc7df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/GeneticAlgorithmBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed partial class GeneticAlgorithmBot : ToolFormBase, IExternalToolFor

private bool _previousInvisibleEmulation = false;

private bool _debug_mode_skipRestart = false;
private const bool _debug_mode_skipRestart = false;

private string _lastOpenedRom = "";

Expand Down Expand Up @@ -118,6 +118,9 @@ public long Generations {
[RequiredService]
public IEmulator Emulator { get; set; } = default!;

[RequiredService]
private IStatable StatableCore { get; set; } = default!;

[RequiredService]
public IMemoryDomains MemoryDomains { get; set; } = default!;

Expand Down Expand Up @@ -261,6 +264,9 @@ public void FinishReplay() {
}

public override void Restart() {
// This has to do with loading and saving save states, which is something the bot needs to function.
_ = StatableCore!;

if (_debug_mode_skipRestart) {
return;
}
Expand Down

0 comments on commit 68cc7df

Please sign in to comment.