Exemple #1
0
        public void ViewStats()
        {
            Console.WriteLine(" 1 = View Stats\n 2 = End Program\n 3 = Menu\n");

            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Stats:");
                    fr.ReadFromFile("../../TeamStats.txt");
                    continue;

                case "2":
                    break;

                case "3":
                    Console.WriteLine(" Menu:   \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not Valid User Input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
        public void ViewPlayerRoster()
        {
            Console.WriteLine(" Choose 1 to view the roster \n Choose 2 end program\n Choose 3 to go to Menu\n");

            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Roster:");
                    fr.ReadFromFile("../../Roster.txt");
                    continue;

                case "2":
                    break;

                case "3":
                    Console.WriteLine(" Menu:   \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not valid user input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
        public void ViewAll()
        {
            UserControls uc = new UserControls();

            uc.GetUserControl();
            //GameSimulator gs = new GameSimulator();
            //gs.SimulateGame();
        }
        public void ManagerSelectsPlayer()
        {
            Console.WriteLine(" Choose 1 for adding players to the lineup \n Choose 2 to remove players from lineup\n Choose 3 to display your Lineup\n Choose 4 to save Lineup\n Choose 5 to display roster\n Choose 6 to end program\n Choose 7 to go to Menu\n");

            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Add players from your roster to the line up:");
                    AddPlayers();
                    continue;

                case "2":
                    Console.WriteLine(" Remove:");
                    RemovePlayers();
                    continue;

                case "3":
                    Console.WriteLine(" LineUp:");
                    foreach (string s in GameLineUp)
                    {
                        Console.WriteLine(s);
                    }
                    continue;

                case "4":
                    Console.WriteLine(" Save Lineup:");
                    SavelineUp();
                    continue;

                case "5":
                    Console.WriteLine(" Roster:");
                    fr.ReadFromFile("../../Roster.txt");
                    continue;

                case "6":
                    break;

                case "7":
                    Console.WriteLine(" Menu:   \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not Valid User Input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
Exemple #5
0
        public void ScheduleSelect()
        {
            Console.WriteLine(" Choose 1 to view Practice Schedule\n Choose 2 to view Weight Training Schedule\n Choose 3 to view One on One Schedule\n Choose 4 to view Game Schedule\nChoose 5 to see All\nChoose 6 to end program\n Choose 7 to go to Menu\n");

            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Practice:\n");
                    ViewPractice();
                    continue;

                case "2":
                    Console.WriteLine(" Weight Training:\n");
                    ViewTraining();
                    continue;

                case "3":
                    Console.WriteLine(" One on One:\n");
                    ViewOneonOne();
                    continue;

                case "4":
                    Console.WriteLine(" Game:\n");
                    ViewGame();
                    continue;

                case "5":
                    Console.WriteLine(" All:\n");
                    ViewAll();
                    continue;

                case "6":
                    break;

                case "7":
                    Console.WriteLine(" Menu:   \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not Valid User Input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
        public void CallPlay()
        {
            Console.WriteLine("------------To use a custom play please go to the CustomPlay.txt and enter the play there------------\n");

            Console.WriteLine("1 = Protect Net\n 2 = Back Check\n 3 = Charge the net\n 4 = Counter Attack\n 5 = Call CustomPlay\n 6 = Call TimeOut\n 7 = End Program\n 8 = Menu\n");
            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Team is now protecting your net");
                    continue;

                case "2":
                    Console.WriteLine(" Team is now back checking");
                    continue;

                case "3":
                    Console.WriteLine(" Team is now charging the net");
                    continue;

                case "4":
                    Console.WriteLine(" Team is Counter attacking oppenent");
                    continue;

                case "5":
                    fr.ReadFromFile("../../CustomPlay.txt");
                    continue;

                case "6":
                    Console.WriteLine(" User called a timeout");
                    continue;

                case "7":
                    break;

                case "8":
                    Console.WriteLine(" Menu:   \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not valid user input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
        public void ScheduleforTeam()
        {
            Console.WriteLine(" Choose 1 to edit Practice Schedule\n Choose 2 to edit Weight Training Schedule\n Choose 3 to edit One on One Schedule\n Choose 4 to edit Game Schedule\n Choose 5 to end program\n Choose 6 to go to Menu\n");

            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Practice:");
                    EditPracticeSchedule();
                    continue;

                case "2":
                    Console.WriteLine(" Weight Training:");
                    EditWeightTrainingSchedule();
                    continue;

                case "3":
                    Console.WriteLine(" One on One:");
                    EditOneOnOneSchedule();
                    continue;

                case "4":
                    Console.WriteLine(" Game:");
                    EditGameSchedule();
                    continue;

                case "5":
                    break;

                case "6":
                    Console.WriteLine(" Menu:  \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not Valid User Input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
Exemple #8
0
        public void MakePlayerRoster()
        {
            Console.WriteLine(" Choose 1 to add players to the roster \n Choose 2 to display your Roster\n Choose 3 to end program\n Choose 4 to go to Menu\n");

            do
            {
                switch (Console.ReadKey().KeyChar.ToString())
                {
                case "1":
                    Console.WriteLine(" Add:");
                    GenerateRoster();
                    continue;

                case "2":
                    Console.WriteLine(" View Roster:");
                    fr.ReadFromFile("../../Roster.txt");
                    continue;

                case "3":
                    break;

                case "4":
                    Console.WriteLine(" Menu:   \n");
                    usercontrols.GetUserControl();
                    return;

                default:
                    Console.WriteLine(" Not valid user input");
                    continue;
                }

                break;
            } while (true);

            Console.WriteLine("Exited");
        }
        public void SimulateGame()
        {
            Console.WriteLine("Game Simulator\n");

            for (int i = 1; i < 21; i++)
            {
                Console.WriteLine("The Game clock is at {0} minutes\n", i);
                Console.WriteLine("The Score is {0} to {1}\n", goal, opponentGoal);
                Console.WriteLine("Please select a play\n");
                Console.WriteLine("1 = Protect Net\n 2 = Back Check\n 3 = Charge the net\n 4 = Counter Attack\n 5 = Call CustomPlay\n 6 = Call TimeOut\n 7 = Score Goal\n 8 = Give up Goal\n 9 = New play Clock\n 0 = Menu\n");
                do
                {
                    switch (Console.ReadKey().KeyChar.ToString())
                    {
                    case "1":
                        Console.WriteLine(" Team is now protecting your net");
                        continue;

                    case "2":
                        Console.WriteLine(" Team is now back checking");
                        continue;

                    case "3":
                        Console.WriteLine(" Team is now charging the net");
                        continue;

                    case "4":
                        Console.WriteLine(" Team is Counter attacking oppenent");
                        continue;

                    case "5":
                        fr.ReadFromFile("../../CustomPlay.txt");
                        continue;

                    case "6":
                        Console.WriteLine(" User called a timeout");
                        continue;

                    case "7":
                        Console.WriteLine(" User scored a goal");
                        ScoreGoal();
                        continue;

                    case "8":
                        Console.WriteLine(" Opponent scored a goal");
                        ScoredOn();
                        continue;

                    case "9":
                        break;

                    case "0":
                        Console.WriteLine(" Menu:   \n");
                        usercontrols.GetUserControl();
                        return;

                    default:
                        Console.WriteLine(" Not valid user input");
                        continue;
                    }

                    break;
                } while (true);

                Console.WriteLine(" ->\n");
            }
            Console.WriteLine("Menu: ");
            usercontrols.GetUserControl();
        }