private void CFBUTTONAI_OnClick(object sender, RoutedEventArgs e) { TTT = null; TTTTimer.Stop(); CFTimer.Stop(); StartCF(); CFTimer = new DispatcherTimer(); CFTimer.Tick += (_, __) => { if (Paused) { return; } try { CF.DoBestMove(); CF.Draw(); } catch { // } }; CFTimer.Interval = new TimeSpan(0, 0, 1); CFTimer.Start(); }
private void StartCF() { CF = new ConnectFour(g, true, Depth); CF.Draw(); }