Exemplo n.º 1
0
        public void playerChooseCard(int placeInArray, Canvas plyrView, Canvas choicesView)
        {
            playersChoice = hand[placeInArray];
            DrawCard(475, 40, hand[placeInArray], Brushes.Red, plyrView);
            Random rand = new Random();
            Int32  j    = rand.Next(0, 87);

            using (applesContext = new ApplesToApplesDBEntities())
            {
                for (int i = 0; i < 5; i++)
                {
                    IEnumerable <String> departmentQuery = from d in applesContext.RedDeckOfCards
                                                           where d.RedIndex == j
                                                           select d.noun;
                    passedIn.Add(departmentQuery.ElementAt(0));
                    j = rand.Next(0, 87);
                }
            }
            passedIn[0] = hand[placeInArray];
            CompJudgeChoose();

            DrawCard(360, 80, judgesChoice, Brushes.Red, choicesView);

            int lefty = 70;

            for (int i = 0; i < 4; i++)
            {
                DrawCard(lefty, 327, hand.ElementAt(i), Brushes.Red, choicesView);
                lefty += 200;
            }
        }
Exemplo n.º 2
0
 public void DealAdjCard(Canvas view, int left, int top)
 {
     Random rand = new Random();
     Int32 j = rand.Next(0, 44);
     using (applesContext = new ApplesToApplesDBEntities())
     {
         IEnumerable<String> query = from d in applesContext.GreenDeckOfCards
                     where d.GreenIndex == j
                     select d.adj;
         DrawCard(left, top, query.ElementAt(0), Brushes.GreenYellow, view);
     }
 }
Exemplo n.º 3
0
        public void DealAdjCard(Canvas view, int left, int top)
        {
            Random rand = new Random();
            Int32  j    = rand.Next(0, 44);

            using (applesContext = new ApplesToApplesDBEntities())
            {
                IEnumerable <String> query = from d in applesContext.GreenDeckOfCards
                                             where d.GreenIndex == j
                                             select d.adj;
                DrawCard(left, top, query.ElementAt(0), Brushes.GreenYellow, view);
            }
        }
Exemplo n.º 4
0
        public void DealCards(Canvas view)
        {
            Random rand = new Random();
            Int32  j    = rand.Next(0, 87);

            using (applesContext = new ApplesToApplesDBEntities())
            {
                for (int i = 0; i < 5; i++)
                {
                    IEnumerable <String> departmentQuery = from d in applesContext.RedDeckOfCards
                                                           where d.RedIndex == j
                                                           select d.noun;
                    hand[i] = departmentQuery.ElementAt(0);
                    j       = rand.Next(0, 87);
                }

                int lefty = 26;
                for (int i = 0; i < 5; i++)
                {
                    DrawCard(lefty, 315, hand.ElementAt(i), Brushes.Red, view);
                    lefty += 170;
                }
            }
        }
Exemplo n.º 5
0
        public void DealCards(Canvas view)
        {
            Random rand = new Random();
            Int32 j = rand.Next(0, 87);
            using (applesContext = new ApplesToApplesDBEntities())
            {
                for (int i = 0; i < 5; i++)
                {
                    IEnumerable<String> departmentQuery = from d in applesContext.RedDeckOfCards
                          where d.RedIndex == j
                          select d.noun;
                    hand[i] = departmentQuery.ElementAt(0);
                    j = rand.Next(0, 87);
                }

                int lefty = 26;
                for (int i = 0; i < 5; i++)
                {

                    DrawCard(lefty, 315, hand.ElementAt(i), Brushes.Red, view);
                    lefty += 170;
                }
            }
        }
Exemplo n.º 6
0
        public void playerChooseCard(int placeInArray, Canvas plyrView, Canvas choicesView)
        {
            playersChoice = hand[placeInArray];
            DrawCard(475, 40, hand[placeInArray], Brushes.Red, plyrView);
            Random rand = new Random();
            Int32 j = rand.Next(0, 87);
            using (applesContext = new ApplesToApplesDBEntities())
            {
                for (int i = 0; i < 5; i++)
                {
                    IEnumerable<String> departmentQuery = from d in applesContext.RedDeckOfCards
                                                          where d.RedIndex == j
                                                          select d.noun;
                    passedIn.Add(departmentQuery.ElementAt(0));
                    j = rand.Next(0, 87);
                }
            }
            passedIn[0] = hand[placeInArray];
            CompJudgeChoose();

            DrawCard(360, 80, judgesChoice, Brushes.Red, choicesView);

            int lefty = 70;
            for (int i = 0; i < 4; i++)
            {

                DrawCard(lefty, 327, hand.ElementAt(i), Brushes.Red, choicesView);
                lefty += 200;
            }
        }