public Round(int lvl, int nbC)
        {
            numberOp   = 2;
            nc         = new NumberCard[nbC];
            numberCard = nbC;
            oc         = new OperateurCard[numberOp];
            genNumber  = new int[nbC];
            for (int j = 0; j < nbC; j++)
            {
                genNumber[j] = -1;
            }
            int opCho = rand.Next(1, 5);

            oc[0] = new OperateurCard(Screen.PrimaryScreen.Bounds.Width - (Screen.PrimaryScreen.Bounds.Width / 100 * 8), /*Screen.PrimaryScreen.Bounds.Height - (Screen.PrimaryScreen.Bounds.Height / 100 * 25)*/ 0, opCho);
            do
            {
                opCho = rand.Next(1, 5);
            } while (opCho == oc[0].symbol);
            oc[1] = new OperateurCard(Screen.PrimaryScreen.Bounds.Width - (oc[0].Width * 2), 0, opCho);
            if (lvl == 1)
            {
                lvl1Creator();
            }
            else
            {
                lvl2Creator();
            }
        }
Example #2
0
        public void operateurCardClick(object sender, EventArgs e)
        {
            OperateurCard card = sender as OperateurCard;

            switch (card.symbol)
            {
            case 1:
                op.Text = "+";
                break;

            case 2:
                op.Text = "-";
                break;

            case 3:
                op.Text = "x";
                break;

            case 4:
                op.Text = "/";
                break;
            }
        }