Exemplo n.º 1
0
        public void createCharacter(InputIterator iterator)
        {
            currentText = "Please enter a name for your character.";
            string name;

            if (iterator.hasNext())
            {
                name = iterator.next();
                if (name == "quit")
                {
                    quit();
                    return;
                }
            }
            else
            {
                archivedInput = iterator.getWalked();
                return;
            }

            currentText = "Please enter your character's class. Your options are: \n- mage \n- warrior \n- hunter";

            if (iterator.hasNext())
            {
                switch (iterator.next())
                {
                case "mage":
                    break;

                case "warrior":
                    break;

                case "hunter":
                    break;

                case "quit":
                    quit();
                    return;

                default:
                    currentText  += "\nNot a valid option.";
                    archivedInput = iterator.getWalkedMinusOne();
                    return;
                }
            }
            else
            {
                archivedInput = iterator.getWalked();
                return;
            }
        }