protected override void OnStartup(StartupEventArgs e) { var eventAggregator = new EventAggregator(); var cellRepository = new CellRepository(); var cellViewModelFactory = new CellViewModelFactory(eventAggregator, cellRepository); var ninerViewModelFactory = new NinerViewModelFactory(cellViewModelFactory); var puzzleViewModel = new PuzzleViewModel(ninerViewModelFactory, eventAggregator); var rules = new IMightBeAbleToHelp[] { new ActualsCollide(), new OnlyOneSpace(), new OnlyOnePotential(), new PotentialsMatchAnActual(), }; new Solver(eventAggregator, cellRepository, rules); var window = new MainWindow(puzzleViewModel); window.Show(); }
public CellFinder(PuzzleViewModel viewModel) { _viewModel = viewModel; }
public Operations(PuzzleViewModel viewModel) { _viewModel = viewModel; }
public MainWindow(PuzzleViewModel vm) { InitializeComponent(); DataContext = vm; }