Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- namespace ConsoleMenu
- {
- class Game
- {
- private Menu gameMenu;
- public Game()
- {
- gameMenu = new Menu();
- }
- public void Begin()
- {
- MenuOptions selectedOption;
- do
- {
- selectedOption = gameMenu.ShowMenu();
- if (selectedOption == MenuOptions.Play)
- Play();
- else if (selectedOption == MenuOptions.Exit)
- Exit();
- else
- ShowCredits();
- } while (selectedOption == MenuOptions.Credits);
- }
- private void ShowCredits()
- {
- Console.Clear();
- Console.WriteLine("Written By: insertAlias");
- Thread.Sleep(500);
- Console.WriteLine("Directed By: insertAlias");
- Thread.Sleep(500);
- Console.WriteLine("Produced By: insertAlias");
- Thread.Sleep(500);
- Console.WriteLine("Played By: You!");
- Thread.Sleep(500);
- Console.WriteLine("Press any key to return to the menu.");
- Console.ReadKey();
- }
- private void Play()
- {
- Console.Clear();
- Console.WriteLine("Beginning Game...");
- Thread.Sleep(500);
- Console.WriteLine("Playing Game...");
- Thread.Sleep(500);
- Console.WriteLine("Exiting Game...");
- }
- private void Exit()
- {
- Console.Clear();
- Console.WriteLine("Exiting Game...");
- Thread.Sleep(500);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement