/// <summary> /// Signal Client(s) of the solution result obtained from solving the problem using a given strategy /// </summary> /// <param name="strategy">Identifiable name for the <see cref="WaterBucket.Domain.ISolutionStrategy"/> used to solve the problem and reaching this <see cref="WaterBucket.Domain.SolutionResult"/></param> /// <param name="result">The <see cref="WaterBucket.Domain.SolutionResult"/> from using a specific <see cref="WaterBucket.Domain.ISolutionStrategy"/> to solve the <see cref="WaterBucket.Domain.Problem"/></param> /// <seealso cref="ProblemSolutionCompleted"/> protected void SignalSolution(string strategy, SolutionResult result) { if (BroadcastAll) { Clients.All.problemSolution(strategy, result); } else { Clients.Caller.problemSolution(strategy, result); } }
public override void RemoteResult(SolutionResult result) { _result = result; _stepsTaken = result.NumberOfActions; WaterSource = new Reservoire(result.EndingReservoireState); }
public abstract void RemoteResult(SolutionResult result);
public static SolutionResult GetFromBytes(byte[] data, ref int offset, Encoding textEncoding = null) { SolutionResult sr = new SolutionResult(); offset = sr.FromBytes(data, offset, textEncoding); return sr; }