Пример #1
0
        //Used to make the content box object for the page commands subject to future removal
        public ContentBox SetCommandBox(List <string> commands, string title = null, int currentCmd = 0)
        {
            ContentBox box = new ContentBox();

            box.title         = title;
            box.content       = commands;
            box.currentChoice = currentCmd;

            return(box);
        }
Пример #2
0
        //Sets up the possible boxes the this specific page.
        private static List <ContentBox> getOptions()
        {
            List <ContentBox> result    = new List <ContentBox>();
            ContentBox        Sex       = new ContentBox();
            ContentBox        Gender    = new ContentBox();
            ContentBox        Race      = new ContentBox();
            ContentBox        Skills    = new ContentBox();
            ContentBox        Past      = new ContentBox();
            ContentBox        Mentality = new ContentBox();
            ContentBox        Vice      = new ContentBox();
            ContentBox        Virtue    = new ContentBox();

            Sex.title       = "Sex";
            Gender.title    = "Gender";
            Race.title      = "Race";
            Skills.title    = "Skills";
            Past.title      = "Past";
            Mentality.title = "Mentality";
            Vice.title      = "Vice";
            Virtue.title    = "Virtue";

            Sex.content       = commands.returnCommandList(new string[] { "Male", "Female" });
            Gender.content    = commands.returnCommandList(new string[] { "Male", "Female", "Other" });
            Race.content      = commands.returnCommandList(new string[] { "Alderan", "Brutaris", "Levenite", "Beholden" });
            Skills.content    = commands.returnCommandList(new string[] { "Mechanical", "Magic", "Science", "Arcanology", "Combat", "Speech", "Chemistry", "Blacksmithing", "Engineering", "None" });
            Past.content      = commands.returnCommandList(new string[] { "Trooper", "Engineer", "Wizard", "Scientist", "Arcanologist", "Politician", "Weaponsmith", "Farmhand", "Citizen" });
            Mentality.content = commands.returnCommandList(new string[] { "Social", "Antisocial", "Leader", "Follower", "Learning", "Agressive", "Passive" });
            Vice.content      = commands.returnCommandList(new string[] { "Liar", "Greedy", "Angry", "Narcisstic", "Malevolent" });
            Virtue.content    = commands.returnCommandList(new string[] { "Honorable", "Loving", "Benevolent", "Virtuous", "Couragous" });

            Sex.desc       = "This is what your character was born as when it comees to biological sex. This can change what items will work for you. ie) Armors";
            Gender.desc    = "This dictates what pronoun is used in the game and what gender you identify as.";
            Race.desc      = "This is what race you were born as. Each race has some natural additaves.";
            Skills.desc    = "This is what your good at and what your able to do. Higher skill levels means its easier to do specific actions.";
            Past.desc      = "This is how you grew up and what you went through as a child and teen. This effects some of your skills and even your mentality.";
            Mentality.desc = "How you see others and the world around you. Different mentalities will effect the options available to you.";
            Vice.desc      = "This is a singular problem or trouble you may have that holds you back. Mostly provided for interesting play";
            Virtue.desc    = "This is a singular good thing about you that helps you only slighly in a few ways. Mostly provided for interesting play";

            result.Add(Sex);
            result.Add(Gender);
            result.Add(Race);
            result.Add(Skills);
            result.Add(Past);
            result.Add(Mentality);
            result.Add(Vice);
            result.Add(Virtue);

            return(result);
        }
Пример #3
0
        public static void BeginGame(bool firstStart = true)
        {
            Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight);

            _align.centerText("Welcome to This Game known as \"ThatGame\"", firstStart);
            _align.centerText(" Use the arrowkeys or WS to scroll up/down the list. Press Enter to select", firstStart);

            if (firstStart == true)
            {
                StartCommands = commands.SetCommandBox(_commands);
            }

            StartCommands.currentChoice = commands.printCommands(StartCommands, firstStart);

            listen();
        }
Пример #4
0
        //For printing out any pages specific command list
        public int printCommands(ContentBox commands, bool slowType = true, int posX = 80, int posY = 10, ConsoleColor color = ConsoleColor.White)
        {
            Console.WriteLine("\n");

            if (commands.currentChoice < 0)
            {
                commands.currentChoice = 0;
            }
            else if (commands.currentChoice >= commands.content.Count)
            {
                commands.currentChoice = (commands.content.Count - 1);
            }
            _align.boxContent(commands, posX, posY, color);

            return(commands.currentChoice);
        }
Пример #5
0
        //Used to make content boxes on the screen
        public void boxContent(ContentBox content, int posX, int posY, ConsoleColor color = ConsoleColor.White)
        {
            Console.SetCursorPosition(posX, posY);
            Console.ForegroundColor = color;
            int largestItem = getLargestItem(content.content);
            int lineWidth   = 0;

            if (content.title != null && content.title.Length > largestItem)
            {
                lineWidth = (content.title.Length + 4);
            }
            else
            {
                lineWidth = (largestItem + 4);
            }
            //int lineWidth = ( + 4);

            for (int i = 0; i < 3; i++)
            {
                if (i == 0)
                {
                    Console.WriteLine(borderLine(lineWidth));
                    Console.SetCursorPosition(posX, Console.CursorTop);

                    if (content.title != null)
                    {
                        Console.ForegroundColor = ConsoleColor.Blue;
                        Console.WriteLine(contentLine(lineWidth, content.title));
                        Console.SetCursorPosition(posX, Console.CursorTop);
                        Console.ForegroundColor = color;
                        Console.WriteLine(divider(lineWidth));
                        Console.SetCursorPosition(posX, Console.CursorTop);
                    }
                    else
                    {
                        Console.WriteLine(paddingLine(lineWidth));
                        Console.SetCursorPosition(posX, Console.CursorTop);
                    }
                }
                else if (i == 2)
                {
                    Console.WriteLine(paddingLine(lineWidth));
                    Console.SetCursorPosition(posX, Console.CursorTop);
                    Console.WriteLine(borderLine(lineWidth));
                }
                else
                {
                    foreach (string item in content.content)
                    {
                        if (content.currentChoice == content.content.IndexOf(item))
                        {
                            Console.ForegroundColor = ConsoleColor.Green;
                            Console.WriteLine(contentLine(lineWidth, item));
                            Console.ForegroundColor = color;
                            Console.SetCursorPosition(posX, Console.CursorTop);
                            ;
                        }
                        else
                        {
                            Console.WriteLine(contentLine(lineWidth, item));
                            Console.SetCursorPosition(posX, Console.CursorTop);
                        }
                    }
                }
            }
            Console.ResetColor();
        }