Esempio n. 1
0
        public int score()
        {
            Darts dart = new Darts();

            int throwValue = dart.Throw();

            if (throwValue != 0)
            {
                if (dart.isMultiplyer())
                {
                    return(throwValue *= 2);
                }
                if (dart.isMultiplyer())
                {
                    return(throwValue *= 3);
                }
            }

            else if (throwValue == 0)
            {
                throwValue = dart.bull();
                if (throwValue == 1)
                {
                    return(50);
                }
                else
                {
                    return(25);
                }
            }


            return(throwValue);
        }
Esempio n. 2
0
        // Public methods.
        //
        public void ThrowDarts()
        {
            //Random random = new Random();
            Darts dartsGame = new Darts(_random);

            // Loop to represent the 3 darts each player gets to play with
            for (int i = 0; i < 3; i++)
            {
                dartsGame.Throw();
                determineMultiplier(dartsGame);
            }
        }