private void ButtonResetPlayers_Click(object sender, System.EventArgs e) { TextboxCardInput.Focus(); SelectedPlayers.Items.Clear(); for (int i = 1; i < Game.Players.Count; i++) { SelectedPlayers.Items.Add(string.Format("Player {0}", i)); } }
private async void ButtonLack_Click(object sender, System.EventArgs e) { TextboxCardInput.Focus(); foreach (string player in SelectedPlayers.CheckedItems) { int playerIndex = int.Parse(player[7].ToString()); await Task.Run(() => Game.Lack(SelectedCards, playerIndex)); } ButtonResetPlayers_Click(sender, e); UpdateDetermined(); }