Exemplo n.º 1
0
        private void Player2NumberOfChips_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            List <int> a = new List <int>();

            for (int i = 1; i <= Convert.ToInt32(Player2NumberOfChipsLB.SelectedValue); i++)
            {
                a.Add(i);
            }
            Player2CurrentChipLB.ItemsSource = a;

            game.InitPlayer2Count(Convert.ToInt32(Player2NumberOfChipsLB.SelectedValue));

            XPlayer2TB.Clear();
            YPlayer2TB.Clear();
            LifePlayer2TB.Clear();
        }
Exemplo n.º 2
0
        }  //check

        private void XYPlayer2TB_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (Player2CurrentChipLB.SelectedValue == null)
            {
                XPlayer2TB.Clear();
                YPlayer2TB.Clear();
            }
            else
            {
                SCM.TBTreating(XPlayer2TB, game.MapSizeX);
                SCM.TBTreating(YPlayer2TB, game.MapSizeY);
            }
            if (XPlayer2TB.Text == "" || YPlayer2TB.Text == "")
            {
                LifePlayer2TB.Clear();
            }
        }