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

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

            gameFieldWindow.Show();
            mainWindow.Close();
        }
Example #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();
        }