Esempio n. 1
0
    static void Main(string[] args)
    {
        WelcomeScreen w = new WelcomeScreen();

        w.Display();

        bool finished = false;

        do
        {
            MenuScreen menu = new MenuScreen();
            menu.Display();
            switch (menu.GetChosenOption())
            {
            case MenuScreen.PLAY:
                Game g = new Game();
                g.Run();
                break;

            case MenuScreen.CREDITS:
                CreditsScreen c = new CreditsScreen();
                c.Display();
                break;

            case MenuScreen.QUIT:
                finished = true;
                break;
            }
        }while (!finished);
    }
Esempio n. 2
0
    public void Run()
    {
        // TO DO: Create a real Menu, instead of showing all the screens

        IntroScreen intro = new IntroScreen();

        intro.Run();

        MenuScreen menu = new MenuScreen();

        do
        {
            menu.Run();
            switch (menu.GetChosenOption())
            {
            case MenuScreen.MenuOption.Game:
                Game g = new Game(menu.RetroLook);
                g.Run();
                break;

            case MenuScreen.MenuOption.Help:
                HelpScreen help = new HelpScreen(menu.RetroLook);
                help.Run();
                break;

            case MenuScreen.MenuOption.Credits:
                CreditsScreen credits = new CreditsScreen(menu.RetroLook);
                credits.Run();
                break;

            case MenuScreen.MenuOption.Scores:
                HiScoresScreen hiScores = new HiScoresScreen(menu.RetroLook);
                hiScores.Run();
                break;
            }
        } while (menu.GetChosenOption() != MenuScreen.MenuOption.Exit);
    }
Esempio n. 3
0
    public void Run()
    {
        Hardware      hardware = new Hardware(1000, 600, 24, false);
        WelcomeScreen welcome  = new WelcomeScreen(hardware);
        MenuScreen    menu     = new MenuScreen(hardware);

        welcome.Run();
        bool exit = false;

        do
        {
            menu.Run();
            switch (menu.GetChosenOption())
            {
            case MenuScreen.MenuOption.Game:
                NumPlayersScreen nps = new NumPlayersScreen(hardware);
                nps.Run();
                GameScreen game = new GameScreen(hardware,
                                                 nps.NumPlayers, nps.NumsToken);
                game.Run();
                break;

            case MenuScreen.MenuOption.Load:
                LoadScreen ls = new LoadScreen(hardware);
                ls.Run();
                break;

            case MenuScreen.MenuOption.Credits:
                CreditsScreen cs = new CreditsScreen(hardware);
                cs.Run();
                break;

            case MenuScreen.MenuOption.ChangeLenguage:
                ChangeLenguageScreen cls =
                    new ChangeLenguageScreen(hardware);
                cls.Run();
                break;

            case MenuScreen.MenuOption.Exit:
                exit = true;
                break;
            }
        }while (!exit);
    }