public void Start() => Task.Run(async() => { _cells = GenerateInitialState(); NewState?.Invoke(this); while (!_doneCts.Token.IsCancellationRequested) { Thread.Sleep(Period); _cells = await GenerateNewState(_cells); NewState?.Invoke(this); } }, _doneCts.Token);
private void OnNewState(State newState) { NewState?.Invoke(this, new EventArgs <State>(newState)); }
protected virtual void OnNewState(RuleStateEventArgs e) { FinishCheck(e); NewState?.Invoke(this, e); }
private void NewVariant(string obj) { NewState?.Invoke(obj); }