Esempio n. 1
0
        public override string igbo()
        {
            int       m      = propValue / 10;
            int       n      = propValue % 10;
            FullTenth ft     = new FullTenth();
            UnitN     un     = new UnitN();
            string    prefix = " na ";

            ft.propValue = m * 10;
            un.propValue = n;
            string result = ft.igbo() + prefix + un.igbo();

            return(result);
        }
Esempio n. 2
0
        public override void play(bool alone)
        {
            int       m  = propValue / 10;
            int       n  = propValue % 10;
            FullTenth ft = new FullTenth();
            UnitN     un = new UnitN();

            ft.propValue = m * 10;
            un.propValue = n;

            if (alone == true)
            {
                ft.play(true);
            }
            if (alone == false)
            {
                ft.play(false);
            }
            un.play(false);
        }
Esempio n. 3
0
        public Number generatedNumber(int n)
        {
            Number result = null;

            if ((n >= 1) && (n <= 9))
            {
                UnitN unit = new UnitN();
                unit.propValue = n;
                result         = unit;
            }

            if (((n % 10) == 0) & (n >= 10) & (n <= 99))
            {
                FullTenth fullTen = new FullTenth();
                fullTen.propValue = n;
                result            = fullTen;
            }

            if (((n % 10) != 0) & (n >= 10) & (n <= 99))
            {
                HalfTenth halfTen = new HalfTenth();
                halfTen.propValue = n;
                result            = halfTen;
            }

            if (((n % 100) == 0) & (n >= 100) & (n <= 999))
            {
                FullHundred fullHun = new FullHundred();
                fullHun.propValue = n;
                result            = fullHun;
            }

            if (((n % 100) != 0) & (n >= 100) & (n <= 999))
            {
                HalfHundred halfHun = new HalfHundred();
                halfHun.propValue = n;
                result            = halfHun;
            }
            return(result);
        }
Esempio n. 4
0
        public Number generatedNumber()
        {
            Number result = null;

            if (range == "1, 2, 3,...., 9")
            {
                UnitN unit = new UnitN();
                unit.propValue = myVal;
                result         = unit;
            }

            if (range == "10, 20, 30,...., 90")
            {
                FullTenth fullTen = new FullTenth();
                fullTen.propValue = myVal;
                result            = fullTen;
            }

            if (range == "11, 12, 13,...., 21, 22,...., 97, 98, 99")
            {
                HalfTenth halfTen = new HalfTenth();
                halfTen.propValue = myVal;
                result            = halfTen;
            }

            if (range == "100, 200, 300,...., 900")
            {
                FullHundred fullHun = new FullHundred();
                fullHun.propValue = myVal;
                result            = fullHun;
            }

            if (range == "101, 102, 103,...., 997, 998, 999")
            {
                HalfHundred halfHun = new HalfHundred();
                halfHun.propValue = myVal;
                result            = halfHun;
            }
            return(result);
        }