示例#1
0
 public static void ShareOutCards(ref List <float>[] PlayersCards, ref Queue <float> CardsStore)
 {
     for (int index = 0; index < PlayersCards.Length; ++index)
     {
         PlayersCards[index] = Logic_sAlgorithms.DistributeCards(ref PlayersCards[index], ref CardsStore);
     }
 }
示例#2
0
        public static int TrumpCARD(ref Label _LearImg, ref float[] Array)
        {
            int TC = Logic_sAlgorithms._TrumpCard();

            _LearImg.Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/LearsImage/" + TC + ".jpg")));

            return(TC);
        }
示例#3
0
 public static Brush Steps(Label Field, float Pl_Card, int _TrumpCard, float En_Card)
 {
     if (Logic_sAlgorithms.BeatCard(Pl_Card, En_Card, _TrumpCard))
     {
         Field.BorderBrush = null;
         return(new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/" + Pl_Card + ".png"))));
     }
     MessageBox.Show("Sorry, but you can't beat this card.");
     return(null);
 }
示例#4
0
 private void Beat()
 {
     for (int i = 0; i < 6; ++i)
     {
         if (PlayerCardsImage[i].Background == _BufferCards.Background)
         {
             PlayerCardsImage[i].Background = null;
             PlayersCards[0].Remove(_Buff_FLOAT_Card);
             _BufferCards     = null;
             _Buff_FLOAT_Card = 0;
             Logic_sAlgorithms.LookCards(ref PlayersCards[0], ref PlayerCardsImage);
             break;
         }
     }
 }
示例#5
0
        public MainWindow(byte QtyPL)
        {
            QuantityPlayers = QtyPL;
            InitializeComponent();
            InitializePlayers();

            Logic_sAlgorithms.Variable.Add(1);
            MessageBox.Show(Logic_sAlgorithms.Variable.Count.ToString());
            Logic_sAlgorithms.Variable.Add(1);
            MessageBox.Show(Logic_sAlgorithms.Variable.Count.ToString());



            //MessageBox.Show((BigField.Children[5]).ToString());
            //        ((Label)BigField.Children[5]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/1.1.png")));
            //      ((Label)BigField.Children[6]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/2.1.png")));
            //((Label)BigField.Children[7]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/1.3.png")));
            //((Label)BigField.Children[8]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/2.2.png")));
            //((Label)BigField.Children[5]).BorderBrush = Brushes.DarkViolet;
            //((Label)BigField.Children[5]).BorderThickness = new Thickness(5);
            //((Label)BigField.Children[6]).BorderBrush = Brushes.DarkViolet;
            //((Label)BigField.Children[6]).BorderThickness = new Thickness(5);
            //((Label)BigField.Children[7]).BorderBrush = Brushes.DarkViolet;
            //((Label)BigField.Children[7]).BorderThickness = new Thickness(5);

            Logic_sAlgorithms.MixCards(ref BigCardsArray);
            Logic_sAlgorithms.LayingCardsINDeck(ref BigCardsArray, ref CardsStore);
            PlayAlgorithms.ShareOutCards(ref PlayersCards, ref CardsStore);

            ((Label)BigField.Children[5]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/" + PlayersCards[1][3] + ".png")));
            ((Label)BigField.Children[7]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/" + PlayersCards[1][4] + ".png")));
            ((Label)BigField.Children[9]).Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Kursach;component/CardsImage/" + PlayersCards[1][5] + ".png")));

            _TrumpCard = PlayAlgorithms.TrumpCARD(ref LearImg, ref BigCardsArray);
            int FirstPlayer = 0; // PlayAlgorithms.CheckPlayerStep(ref PlayersCards, ref _TrumpCard);

            if (FirstPlayer == 0)
            {
                L_Pl_Field.IsEnabled = true;
            }
            MessageBox.Show(FirstPlayer.ToString());
            Logic_sAlgorithms.LookCards(ref PlayersCards[0], ref PlayerCardsImage);
        }
示例#6
0
 private void Card_Six_MouseDown(object sender, MouseButtonEventArgs e)
 {
     _BufferCards = Card_Six;
     Logic_sAlgorithms.VisualAnimation(ref BigField);
     _Buff_FLOAT_Card = PlayersCards[0][5];
 }