Пример #1
0
    class user { //! ADDING NEW FUNCTIONS
        public void check()
        {
            Person        Boy  = new Person();
            Person        Girl = new Person();
            personalities perc = new personalities();

            Program.def d = new Program.def();
            if (Program.def.finalGender == "boy")
            {
                //* This part is pretty complicated... OH WHO AM I KIDDING!

                Console.Write("Enter your name in : ");
                Boy.name = Console.ReadLine();
                Console.WriteLine();
                while (string.IsNullOrEmpty(Boy.name))   //? This checks if the input is empty. If it is empty,
                {
                    Console.WriteLine();
                    Console.WriteLine("Name cant be empty. Please re-enter your name"); //? Then it spits out an error
                    Boy.name = Console.ReadLine();                                      //? Reprompt the input
                }

                Console.Write("Enter your age : ");
                var ageAsString = Console.ReadLine();
                Console.WriteLine();
                while (!int.TryParse(ageAsString, out Boy.age))
                {
                    Console.WriteLine();
                    Console.WriteLine("Please re-enter your age.");
                    ageAsString = Console.ReadLine();
                }

                perc.lazyPrint();
                Console.Write("Enter your personality here : ");
                var personaAsStr = Console.ReadLine();
                Console.WriteLine();
                while (!int.TryParse(personaAsStr, out Boy.personality))
                {
                    Console.WriteLine();
                    Console.WriteLine("Personality cant be empty. Please re-enter your personality.");
                    personaAsStr = Console.ReadLine();
                }
                switch (Boy.personality)
                {
                case 1:
                    Boy.str_personality = "Openness";
                    break;

                case 2:
                    Boy.str_personality = "Conscientiousness";
                    break;

                case 3:
                    Boy.str_personality = "Extraversion";
                    break;

                case 4:
                    Boy.str_personality = "Agreeableness";
                    break;

                case 5:
                    Boy.str_personality = "Neuroticism";
                    break;

                default:
                    Console.WriteLine("Invalid personality. Please reinput it after this line");
                    Boy.personality = Int32.Parse(Console.ReadLine());
                    break;
                }
                Console.WriteLine(Boy.name + " " + Boy.age + " " + Boy.str_personality);
            }
            else
            {
                Console.Write("Enter your name in : ");
                Girl.name = Console.ReadLine();
                Console.WriteLine();
                while (string.IsNullOrEmpty(Girl.name))
                {
                    Console.WriteLine();
                    Console.WriteLine("Name cant be empty. Please re-enter your name");
                    Girl.name = Console.ReadLine();
                }

                Console.Write("Enter your age : ");
                var ageAsString = Console.ReadLine();
                Console.WriteLine();
                while (!int.TryParse(ageAsString, out Girl.age))
                {
                    Console.WriteLine();
                    Console.WriteLine("Please re-enter your age: ");
                    ageAsString = Console.ReadLine();
                }
                perc.lazyPrint();
                Console.Write("Enter your personality here : ");
                Girl.personality = Int32.Parse(Console.ReadLine());
                Console.WriteLine();
                while (string.IsNullOrEmpty(Girl.personality.ToString()))
                {
                    Console.WriteLine();
                    Console.WriteLine("Personality cant be empty. Please re-enter your personality.");
                    Girl.personality = Int32.Parse(Console.ReadLine());
                }

                switch (Girl.personality)
                {
                case 1:
                    Girl.str_personality = "Openness";
                    break;

                case 2:
                    Girl.str_personality = "Conscientiousness";
                    break;

                case 3:
                    Girl.str_personality = "Extraversion";
                    break;

                case 4:
                    Girl.str_personality = "Agreeableness";
                    break;

                case 5:
                    Girl.str_personality = "Neuroticism";
                    break;

                default:
                    Console.WriteLine("Invalid personality. Please reinput it after this line");
                    Girl.personality = Int32.Parse(Console.ReadLine());
                    break;
                }

                Console.WriteLine(Girl.name + " " + Girl.age + " " + Girl.str_personality);
            }
        }
Пример #2
0
    class crush { //! ADDING NEW FUNCTIONS
        public void check()
        {
            Person        Boy  = new Person();
            Person        Girl = new Person();
            personalities perc = new personalities();

            Program.def d = new Program.def();

            if (Program.def.finalGender == "boy")
            {
                Console.Write("Enter your crush's name in : ");
                Girl.name = Console.ReadLine();
                Console.WriteLine();
                while (string.IsNullOrEmpty(Girl.name))
                {
                    Console.WriteLine();
                    Console.WriteLine("Name cant be empty. Please re-enter your crush's name");
                    Girl.name = Console.ReadLine();
                }

                Console.Write("Enter your crush's age : ");
                var ageAsString = Console.ReadLine();
                Console.WriteLine();
                while (!int.TryParse(ageAsString, out Girl.age))
                {
                    Console.WriteLine();
                    Console.WriteLine("Please re-enter your crush's age.");
                    ageAsString = Console.ReadLine();
                }
                perc.lazyPrint();
                Console.Write("Enter your crush's personality here : ");
                Girl.personality = Int32.Parse(Console.ReadLine());
                Console.WriteLine();
                while (string.IsNullOrEmpty(Girl.personality.ToString()))
                {
                    Console.WriteLine();
                    Console.WriteLine("Personality cant be empty. Please re-enter your crush's personality.");
                    Girl.personality = Int32.Parse(Console.ReadLine());
                }

                switch (Girl.personality)
                {
                case 1:
                    Girl.str_personality = "Openness";
                    break;

                case 2:
                    Girl.str_personality = "Conscientiousness";
                    break;

                case 3:
                    Girl.str_personality = "Extraversion";
                    break;

                case 4:
                    Girl.str_personality = "Agreeableness";
                    break;

                case 5:
                    Girl.str_personality = "Neuroticism";
                    break;

                default:
                    Console.WriteLine("Invalid personality. Please reinput it after this line");
                    Girl.personality = Int32.Parse(Console.ReadLine());
                    break;
                }

                Console.WriteLine(Girl.name + " " + Girl.age + " " + Girl.str_personality);
            }
            else
            {
                Console.Write("Enter your crush's name in : ");
                Boy.name = Console.ReadLine();
                Console.WriteLine();
                while (string.IsNullOrEmpty(Boy.name))
                {
                    Console.WriteLine();
                    Console.WriteLine("Name cant be empty. Please re-enter your crush's name");
                    Boy.name = Console.ReadLine();
                }

                Console.Write("Enter your crush's age : ");
                var ageAsString = Console.ReadLine();
                Console.WriteLine();
                while (!int.TryParse(ageAsString, out Boy.age))
                {
                    Console.WriteLine();
                    Console.WriteLine("Please re-enter your crush's age.");
                    ageAsString = Console.ReadLine();
                }
                perc.lazyPrint();
                Console.Write("Enter your crush's personality here : ");
                Boy.personality = Int32.Parse(Console.ReadLine());
                Console.WriteLine();
                while (string.IsNullOrEmpty(Boy.personality.ToString()))
                {
                    Console.WriteLine();
                    Console.WriteLine("Personality cant be empty. Please re-enter your crush's personality.");
                    Boy.personality = Int32.Parse(Console.ReadLine());
                }

                switch (Boy.personality)
                {
                case 1:
                    Boy.str_personality = "Openness";
                    break;

                case 2:
                    Boy.str_personality = "Conscientiousness";
                    break;

                case 3:
                    Boy.str_personality = "Extraversion";
                    break;

                case 4:
                    Boy.str_personality = "Agreeableness";
                    break;

                case 5:
                    Boy.str_personality = "Neuroticism";
                    break;

                default:
                    Console.WriteLine("Invalid personality. Please reinput it after this line");
                    Boy.personality = Int32.Parse(Console.ReadLine());
                    break;
                }

                Console.WriteLine(Boy.name + " " + Boy.age + " " + Boy.str_personality);
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            //* New sub-classes
            var    gCheck = new gender_check();
            user   user   = new user();
            crush  crush  = new crush();
            Person Boy    = new Person();
            Person Girl   = new Person();
            var    perc   = new personalities();
            def    d      = new def();
            string url    = "https://en.wikipedia.org/wiki/Big_Five_personality_traits#Descriptions_of_the_particular_personality_traits";

            //* Actual program starts here
            Console.Title = "Dating Predictions by AmirulDevKun";
            String asciiArt = @"
                                
██████╗░░█████╗░████████╗██╗███╗░░██╗░██████╗░
██╔══██╗██╔══██╗╚══██╔══╝██║████╗░██║██╔════╝░
██║░░██║███████║░░░██║░░░██║██╔██╗██║██║░░██╗░
██║░░██║██╔══██║░░░██║░░░██║██║╚████║██║░░╚██╗
██████╔╝██║░░██║░░░██║░░░██║██║░╚███║╚██████╔╝
╚═════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝╚═╝░░╚══╝░╚═════╝░

██████╗░██████╗░███████╗██████╗░██╗░█████╗░████████╗██╗░█████╗░███╗░░██╗░██████╗
██╔══██╗██╔══██╗██╔════╝██╔══██╗██║██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║██╔════╝
██████╔╝██████╔╝█████╗░░██║░░██║██║██║░░╚═╝░░░██║░░░██║██║░░██║██╔██╗██║╚█████╗░
██╔═══╝░██╔══██╗██╔══╝░░██║░░██║██║██║░░██╗░░░██║░░░██║██║░░██║██║╚████║░╚═══██╗
██║░░░░░██║░░██║███████╗██████╔╝██║╚█████╔╝░░░██║░░░██║╚█████╔╝██║░╚███║██████╔╝
╚═╝░░░░░╚═╝░░╚═╝╚══════╝╚═════╝░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝╚═════╝░

by AmirulDevKun
                ";

            //ScriptAnim();

            //* Prompt for opening personality refrences / definitions.

            void personaResource(string url)
            {
                if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
                {
                    Console.WriteLine("I AM LINUX");
                    Process Proc = new System.Diagnostics.Process();
                    Proc.StartInfo.FileName  = "/usr/bin/firefox";
                    Proc.StartInfo.Arguments = url;
                    Proc.Start();
                }
                else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
                {
                    Console.WriteLine("FORCED TELEMETRY IS COOL!!");
                    Process.Start(new ProcessStartInfo("cmd", $"/c start {url}"));
                }
                else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
                {
                    Console.WriteLine("I PAY EXCESSIVE AMOUNT OF MONEY FOR SHIT HARDWARE");
                    Process.Start("open", url);
                }
                else
                {
                    Console.WriteLine("idk man. your os is weird");
                    System.Environment.Exit(0);
                }
            }

            Console.Write("Do you want to refer the personality resources used? : ");
            string input = Console.ReadLine();

            switch (input)
            {
            case "y":
                personaResource(url);
                Console.WriteLine("When your browser closes, press anything to continue (ignore the gtk message)");
                Console.ReadKey();
                break;

            case "yes":
                personaResource(url);
                Console.WriteLine("When your browser closes, press anything to continue");
                Console.ReadKey();
                break;

            case "Yes":
                personaResource(url);
                Console.WriteLine("When your browser closes, press anything to continue");
                Console.ReadKey();
                break;

            default:
                Console.Write("Don't worry, you can always refer the resources later.\n");
                Console.WriteLine("Press any key to continue");
                Console.ReadKey();
                break;
            }
            Console.Clear();

            //* Drawing the ascii art
            Console.WriteLine(asciiArt);

            //! not useable because it can be skipped and a bug where
            //! the str_personality thing will not print the dedicated personality
            //
            // if (def.gender == "boy" || def.gender == "man")
            // {
            //     def.finalGender = "boy";
            // }
            // else if (def.gender == "girl" || def.gender == "woman")
            // {
            //     def.finalGender = "girl";
            // }
            // else {
            //     Console.WriteLine("Gender Input Wrong. Please Put it again");
            //     def.gender = Console.ReadLine();
            // }


            user.check();
            crush.check();
            //perc.lazyPrint();
            Console.WriteLine("The script has ended. Press any key to end the session.");
            Console.ReadKey();
            //EndScriptAnim();
        }