Skip to content

Commit

Permalink
Adjust blinkrate
Browse files Browse the repository at this point in the history
  • Loading branch information
VolkerWollmann committed Jul 24, 2020
1 parent 529e7f2 commit 7f083be
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions MyMasterMind/MyMasterMind/ViewModel/MyMasterMindViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7f083be

Please sign in to comment.