Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public CellFinder(PuzzleViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 3
0
 public Operations(PuzzleViewModel viewModel)
 {
     _viewModel = viewModel;
 }
Esempio n. 4
0
 public MainWindow(PuzzleViewModel vm)
 {
     InitializeComponent();
     DataContext = vm;
 }