예제 #1
0
        //make private TODODODODODODODODODO
        public int MultiplesType(string[] multiples, int seconds)
        {
            List <string> answerList = new List <string>();
            int           score      = 0;
            DateTime      instant;
            string        time;
            DateTime      now = DateTime.Now;

            Station.Write("\n\nType a multiple that is not above");
            do
            {
                if (answerList.Count == 17)
                {
                    break;
                }

                Console.Clear();
                Station.Write("you Have typed : ");
                foreach (var item in answerList)
                {
                    Station.Write(item + ", ");
                }

                Station.WriteLine("\n\nyour current score is " + score.ToString() + "\n");
                instant = DateTime.Now;
                time    = Station.TimeDifference(now).ToString();
                Station.WriteLine("You have used : " + time + " Seconds");

                string answer = Station.Read();

                if (multiples.Contains(answer) && !answerList.Contains(answer))
                {
                    answerList.Add(answer);
                    score++;
                }
                else
                {
                    Station.WriteLine("Nope try again");
                    //score--;
                }
            } while (true);

            int timeInt = Station.TimeDifference(now);

            if (timeInt > seconds)
            {
                return(-1);
            }
            else
            {
                return(score);
            }
        }
예제 #2
0
        public void Start()
        {
            Console.Clear();
            Station.WriteLine("Welcome to the Calender Sage");
            Station.WriteLine("Enter your Level Password");
            Station.WriteLine("There are six levels in total");
            Station.WriteLine("press the [enter] key 'only' to start");

            string pass = Station.Read();

            if (pass == "")
            {
                Level1 l1 = new Level1();
                l1.Start();
            }
            else if (pass == "formula")
            {
                Level2 l2 = new Level2();
                l2.Start();
            }
            else if (pass == "leap years")
            {
                Level3 l3 = new Level3();
                l3.Start();
            }
            else if (pass == "all years")
            {
                Level4 l4 = new Level4();
                l4.Start();
            }

            else if (pass == "other centuries")
            {
                Level5 l5 = new Level5();
                l5.Start();
            }
            else if (pass == "master")
            {
                FinalLevel fl = new FinalLevel();
                fl.Start();
            }
            else
            {
                Station.WriteLine("Wrong Password");
            }
        }
예제 #3
0
        public int Level1Drill(string[] days, string[] daysNum, string[] daysAlpha,
                               int test1Score, int test2Score, int seconds, bool useFirstTest, bool useSecondTest)
        {
            Console.Clear();

            int score = 0;

            Station.WriteLine("Welcome to the Day of week Dril");
            Station.WriteLine("Here we test your memory of days of the week");
            Station.WriteLine("You must finish the whole activity in " + seconds + " seconds");

            Station.WriteLine("\n\n");

            Station.WriteLine("Press Any key to begin");
            Console.ReadKey(true);

            //initialize timer
            DateTime instant;
            string   time;
            DateTime now = DateTime.Now;


            if (useFirstTest)
            {
                Station.RandClear();
                do
                {
                    Console.Clear();
                    Station.WriteLine("\n\nyour current score is " + score.ToString() + "\n");
                    instant = DateTime.Now;
                    time    = Station.TimeDifference(now).ToString();
                    Station.WriteLine("You have used : " + time + " Seconds");
                    Station.WriteLine("You must finish the whole activity in " + seconds + " seconds");
                    Station.WriteLine("\nWhat is the number Equivalent for:");

                    int    randNum = Station.Randomer(0, days.Length);
                    string day     = days[randNum];

                    Station.WriteLine(day);

                    string answer = Station.Read();

                    if (answer == daysNum[randNum])
                    {
                        score++;
                        Station.WriteLine("Correct");
                    }
                    else
                    {
                        score--;
                        Station.WriteLine("Incorrect");
                    }
                }while (score < test1Score);
            }

            if (useSecondTest)
            {
                Station.RandClear();
                do
                {
                    Console.Clear();
                    Station.WriteLine("\nNice now you have to practice as in real life");
                    Station.WriteLine("You must finish the whole activity in " + seconds + " seconds");
                    Station.WriteLine("press :");

                    for (int i = 0; i < days.Length; i++)
                    {
                        Station.WriteLine(daysAlpha[i] + " for " + days[i]);
                    }

                    Station.WriteLine("your current score is " + score.ToString() + "\n");

                    instant = DateTime.Now;
                    time    = Station.TimeDifference(now).ToString();
                    Station.WriteLine("You have used : " + time + " Seconds");

                    Station.WriteLine("\nWhat is the Equivalent for:");

                    int    randNum = Station.Randomer(0, days.Length);
                    string day     = daysNum[randNum];

                    Station.WriteLine(day);

                    string answer = Station.Readletter();

                    if (answer == daysAlpha[randNum])
                    {
                        score++;
                        Station.WriteLine("Correct");
                    }
                    else
                    {
                        score--;
                        Station.WriteLine("Incorrect");
                    }
                }while (score < test2Score + 1);
            }

            instant = DateTime.Now;
            int timeInt = Station.TimeDifference(now);

            if (timeInt > seconds)
            {
                return(-1);
            }
            else
            {
                return(score);
            }
        }
예제 #4
0
        public void Start()
        {
            Console.Clear();

            Station.WriteLine("welcome this is master level");
            Station.WriteLine("in this place you set your");
            Station.WriteLine("time limit and target score");
            Station.WriteLine("you can pace yourself to master");

            Station.WriteLine("Press any key to continue");
            Console.ReadKey();

            //////////////////////

            Console.Clear();

            Station.WriteLine("enter your target score");

            string targetScore    = Station.Read();
            int    targetScoreInt = Int32.Parse(targetScore);

            Station.WriteLine("Enter your Time Limit ");

            string timeLimit    = Station.Read();
            int    timeLimitInt = Int32.Parse(timeLimit);

            Station.WriteLine("enter the year to start from");

            string startYear    = Station.Read();
            int    startYearInt = Int32.Parse(startYear);

            Station.WriteLine("Enter the end year");
            string endYear    = Station.Read();
            int    endYearInt = Int32.Parse(endYear);

            Station.WriteLine("Press any key to begin");
            Console.ReadKey();

            //////////////////////

            int    score;
            Drill2 d2 = new Drill2();

            do
            {
                score = d2.FourYears(startYearInt, endYearInt, timeLimitInt, targetScoreInt);
                if (score == -1)
                {
                    Console.Clear();
                    Station.WriteLine("Sorry but you did not reach your goal");
                    Station.WriteLine("You would have to start again");
                    Station.WriteLine("Press any key to continue");
                    Console.ReadKey();
                }
            }while (score == -1);

            Station.WriteLine("Congratulations your score was " + score.ToString());
            Station.WriteLine("you reached your goal");
            Station.WriteLine("now set another");
            Station.WriteLine("press any key to proceed");
            Console.ReadKey(true);
            Start();

            ////////////////////////////
        }