Ejemplo n.º 1
0
 private void Pick_up_Click(object sender, RoutedEventArgs e)
 {
     if (player1turn == true)
     {
         Card.Card_pick(Place_card_Click, deck, player1, UnoCards, _marginx, _marginy, buttons, player1.Count());
         player1turn = false;
     }
 }
Ejemplo n.º 2
0
        private void Start_Click(object sender, RoutedEventArgs e) // starts game
        {
            Pick_up.Click += Pick_up_Click;
            Button b = (Button)sender;

            RandomNumPicker.Create_deck(UnoCards);
            current = UnoCards[0];
            UnoCards.RemoveAt(0);
            general.Source      = new BitmapImage(new Uri(current.image, UriKind.RelativeOrAbsolute));
            general.DataContext = current;
            for (int i = 0; i < 7; i++)
            {
                Card.Card_pick(Place_card_Click, deck, player1, UnoCards, _marginx, _marginy, buttons, i);
                Get_Opponent.Get_cards(op_deck, Opponent_cards, UnoCards, imgs);
                // b.Click += null;
            }

            UnoCards = UnoCards.OrderBy(i => i.Value).ToList();
        }