コード例 #1
0
        private void RollStats()
        {
            // Create Instance of Dice Interface.
            _dice = new Adventurer(_username);
            Console.WriteLine("Let's roll your stats.");
            _adventurer.CharStats = new Dictionary <string, int>();
            // Roll Each Stat, Add to Dictionary.
            int strength = _dice.StatRoll();

            _adventurer.CharStats.Add("Strength", strength);
            int dexterity = _dice.StatRoll();

            _adventurer.CharStats.Add("Dexterity", dexterity);
            int constitution = _dice.StatRoll();

            _adventurer.CharStats.Add("Constitution", constitution);
            int wisdom = _dice.StatRoll();

            _adventurer.CharStats.Add("Wisdom", wisdom);
            int intelligence = _dice.StatRoll();

            _adventurer.CharStats.Add("Intelligence", intelligence);
            int charisma = _dice.StatRoll();

            _adventurer.CharStats.Add("Charisma", charisma);
        }