void RunGameMethod() { RunGameButton.Hide(); PlayerDisplayPanel.Show(); CurrentShareText.Text = "0"; CurrentShareBox.Show(); foreach (Player p in CurrentGame.Players) { p.OnTakingTurn += TakingTurn; } List <Player> winners = CurrentGame.Run(); gamecount++; //Print to keep track of goal win percentage winners.ForEach(p => WinnerGoalsRecord.Add(p.Goal)); three.Text = (int)(((double)WinnerGoalsRecord.Where(g => g == 3).Count() / gamecount) * 100) + "%"; ten.Text = (int)(((double)WinnerGoalsRecord.Where(g => g == 10).Count() / gamecount) * 100) + "%"; twenty.Text = (int)(((double)WinnerGoalsRecord.Where(g => g == 20).Count() / gamecount) * 100) + "%"; thirty.Text = (int)(((double)WinnerGoalsRecord.Where(g => g == 30).Count() / gamecount) * 100) + "%"; forty.Text = (int)(((double)WinnerGoalsRecord.Where(g => g == 40).Count() / gamecount) * 100) + "%"; GameCount.Text = gamecount.ToString(); }
void UpdateCurrentShareDisplay(int shareValue) { CurrentShareText.Text = shareValue.ToString(); CurrentShareBox.Show(); }