private void ExecuteTryAgain(object obj)
        {
            GameFieldWindow win = new GameFieldWindow();

            this.window.Close();
            win.Show();
        }
Esempio n. 2
0
        //methods for opening/closing windows btnStart,btnExit,openInstructions
        private void StartGame(object param)
        {
            GameFieldWindow gameFieldWindow = new GameFieldWindow();

            gameFieldWindow.Show();
            mainWindow.Close();
        }
Esempio n. 3
0
        public GameFieldViewModel(GameFieldWindow window)
        {
            this.window = window;

            var renderer = new WPFGameRenderer(this.window.PlayGroundCanvas);

            renderer.EndGameAction += this.EndGameActionHandler;
            this.Engine             = new GameEngine(renderer);

            this.Engine.InitGame();
            this.Engine.StartGame();
        }