Skip to content

Commit

Permalink
added RemoveInstanceRequest.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicktrovert committed Apr 18, 2024
1 parent 8f26018 commit 0e6cbe7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChessEngineAPI/App/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ private static void InitializeMethods()
Methods.Add("MAKEMOVE", (value, value2) => MakeMoveRequest(value, value2));
Methods.Add("GETENGINEMOVE", (value, value2) => EngineMoveRequest(value, value2));
Methods.Add("CREATEINSTANCE", (value, value2) => CreateInstanceRequest(value, value2));
Methods.Add("REMOVEINSTANCE", (value, value2) => RemoveInstanceRequest(value, value2));
}

[Requestable<string, string>]
private static void RemoveInstanceRequest(string key, string _Input)
{
GlobalVars.PyProcesses[key].GetProcess.Kill(true);
GlobalVars.PyProcesses.Remove(key);
}
[Requestable<string, string>]
private static void CreateInstanceRequest(string key, string _Input)
{
Expand Down

0 comments on commit 0e6cbe7

Please sign in to comment.