Exemplo n.º 1
0
        public static int ExecutePercentRoll()
        {
            DieRoll tens = new DieRoll(1, 10, 0);
            DieRoll ones = new DieRoll(1, 10, 0);

            int tenVal = tens.ExecuteRoll();
            int oneVal = ones.ExecuteRoll();

            if (tenVal == 10 && oneVal == 10)
            {
                return(100);
            }

            if (tenVal == 10)
            {
                tenVal = 0;
            }

            if (oneVal == 10)
            {
                oneVal = 0;
            }

            return(Int32.Parse(tenVal.ToString() + oneVal.ToString()));
        }
Exemplo n.º 2
0
        public static int ExecutePercentRoll()
        {
            DieRoll tens = new DieRoll(1, 10, 0);
            DieRoll ones = new DieRoll(1, 10, 0);

            int tenVal = tens.ExecuteRoll();
            int oneVal = ones.ExecuteRoll();

            if(tenVal == 10 && oneVal == 10)
            {
                return 100;
            }

            if(tenVal == 10)
            {
                tenVal = 0;
            }

            if(oneVal == 10)
            {
                oneVal = 0;
            }

            return Int32.Parse(tenVal.ToString() + oneVal.ToString());
        }