From 7f083be70875ea6f35b0df69e27293e73e6dc5ee Mon Sep 17 00:00:00 2001 From: Volker Wollmann <64246526+VolkerWollmann@users.noreply.github.com> Date: Fri, 24 Jul 2020 07:52:25 +0200 Subject: [PATCH] Adjust blinkrate --- .../MyMasterMind/ViewModel/MyMasterMindViewModel.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/MyMasterMind/MyMasterMind/ViewModel/MyMasterMindViewModel.cs b/MyMasterMind/MyMasterMind/ViewModel/MyMasterMindViewModel.cs index 8a95a3a..01989fd 100644 --- a/MyMasterMind/MyMasterMind/ViewModel/MyMasterMindViewModel.cs +++ b/MyMasterMind/MyMasterMind/ViewModel/MyMasterMindViewModel.cs @@ -117,18 +117,21 @@ private void BackGroundComputerDoWork(object sender, DoWorkEventArgs e) firstBadEvaluation = Game.GetFirstBadEvalaution(); if (firstBadEvaluation >= 0) { + int badblinkrate = 25; for(int j=0; j < firstBadEvaluation; j++ ) { BackgroundWorker.ReportProgress(0, new ComputerPlayInformation(j, CellMark.CompareTrue )); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(500); BackgroundWorker.ReportProgress(0, new ComputerPlayInformation(j, CellMark.None )); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(500); + + badblinkrate = 500; } BackgroundWorker.ReportProgress(0, new ComputerPlayInformation(firstBadEvaluation, CellMark.CompareFalse)); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(badblinkrate); BackgroundWorker.ReportProgress(0, new ComputerPlayInformation(firstBadEvaluation, CellMark.None)); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(badblinkrate); } if (BackgroundWorker.CancellationPending)