public override string igbo()
        {
            int         m      = propValue / 100;
            int         n      = propValue % 100;
            FullHundred fh     = new FullHundred();
            string      prefix = "na";
            Number      numb   = null;

            fh.propValue = m * 100;

            if ((n % 10) == 0)
            {
                FullTenth ft = new FullTenth();
                ft.propValue = n;
                numb         = ft;
            }
            else
            {
                HalfTenth ht = new HalfTenth();
                ht.propValue = n;
                numb         = ht;
            }
            string result = fh.igbo() + " " + prefix + " " + numb.igbo();

            return(result);
        }
Example #2
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);
        }
Example #3
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);
        }
        public override void play(bool alone)
        {
            int         m    = propValue / 100;
            int         n    = propValue % 100;
            FullHundred fh   = new FullHundred();
            Number      numb = null;

            fh.propValue = m * 100;

            if ((n % 10) == 0)
            {
                FullTenth ft = new FullTenth();
                ft.propValue = n;
                numb         = ft;
            }
            else
            {
                HalfTenth ht = new HalfTenth();
                ht.propValue = n;
                numb         = ht;
            }
            fh.play(true);
            numb.play(false);
        }