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(); }
private void _viewModel_NewGame(object sender, int e) { _model.NewGame(e); }