예제 #1
0
파일: GameForm.cs 프로젝트: mchl12/CluedoAI
        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));
            }
        }
예제 #2
0
파일: GameForm.cs 프로젝트: mchl12/CluedoAI
        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();
        }