예제 #1
0
        private void App_Startup(object sender, StartupEventArgs e)
        {
            _model           = new RohamModel();
            _model.GameOver += _model_GameOver;
            _model.NewGame(8);

            _viewModel          = new RohamViewModel(_model);
            _viewModel.NewGame += _viewModel_NewGame;


            _view             = new MainWindow();
            _view.DataContext = _viewModel;
            _view.Closing    += _view_Closing;
            _view.Show();
        }
예제 #2
0
 private void _viewModel_NewGame(object sender, int e)
 {
     _model.NewGame(e);
 }