Пример #1
0
        static void Main(string[] args)
        {
            strMenu      = loadResources("MenuFox.txt");
            strWin       = loadResources("Win.txt");
            strReference = loadResources("Reference.txt");
            strExit      = loadResources("ExitGame.txt");

            controller = new ApplicationController();
            GameModel gm = new GameModel();

            controller.Add(GameForms.Menu, new CommonPresenter(new ProgramMenuControl(strMenu, new ProgramMenu(), new MenuForm())));
            controller.Add(GameForms.Reference, new CommonPresenter(new ReferenceProgram(strReference)));
            controller.Add(GameForms.SetInfo, new SetGamePresenter(new SetGameView(new SetUpGame()), gm));
            controller.Add(GameForms.Game, new GamePresenter(new GameView(new GameProgramControl(strExit)), gm));
            controller.Add(GameForms.Win, new CommonPresenter(new WinLoseGame(strWin, GameState.Win)));
            controller.Add(GameForms.Lose, new CommonPresenter(new WinLoseGame(strWin, GameState.Lose)));

            Program.controller.RunForm(GameForms.Menu);
        }