public void ReversiGameModelNewGameInitializeTooSmallTest()
        {
            Int32[] wrongGameTableSizesArray = new Int32[] { 10, 2, 20 }; // <- 2

            _dataAccess = new ReversiFileDataAccess(wrongGameTableSizesArray);
            Assert.ThrowsException<ReversiModelException>(() => _model = new ReversiGameModel(_dataAccess, _tableSizeDefaultSetting));
        }
        public void Initialize()
        {
            _dataAccess = new ReversiFileDataAccess(_supportedGameTableSizesArray);

            _model = new ReversiGameModel(_dataAccess, _tableSizeDefaultSetting);

            _model.UpdateTable += new EventHandler<ReversiUpdateTableEventArgs>(model_UpdateTable);
            _model.SetGameEnded += new EventHandler<ReversiSetGameEndedEventArgs>(model_SetGameEnded);
            _model.UpdatePlayerTime += new EventHandler<ReversiUpdatePlayerTimeEventArgs>(model_UpdatePlayerTime);
        }
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs args)
        {
            _model = new ReversiGameModel(new ReversiFileDataAccess(_supportedGameTableSizesArray), _tableSizeDefaultSetting); // létrehozzuk a modellt perzisztanciával
            _model.SetGameEnded += new EventHandler<ReversiSetGameEndedEventArgs>(Model_SetGameEnded);

            _viewModel = new ReversiViewModel(_model); // létrehozzuk a nézetmodellt
            _viewModel.NewGame += ViewModel_NewGame;
            _viewModel.LoadGame += new EventHandler(ViewModel_LoadGame); // kezeljük a nézetmodell eseményeit
            _viewModel.SaveGame += new EventHandler(ViewModel_SaveGame);
            _viewModel.ReadRules += new EventHandler(ViewModel_ReadRules);
            _viewModel.ReadAbout += new EventHandler(ViewModel_ReadAbout);
            // a kilépést most nem kell

            Frame rootFrame = new Frame(); // létrehozzuk az ablakkeretet
            rootFrame.DataContext = _viewModel; // erre állítjuk be a nézetmodellt

            Window.Current.Content = rootFrame; // a keretet állítjuk be tartalomnak

            // amennyiben nem a felhasználó zárta be az alkalmazást, be kell töltenünk a korábbi állapotot
            if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
            {
                LoadAppState();
            }

            if (!rootFrame.Navigate(typeof(MainPage), args.Arguments)) // beállítjuk a nyitóképernyőt
            {
                throw new Exception("Failed to create initial page");
            }

            // amennyiben a rendszer fel akarja venni a saját parancsainkat
            SettingsPane.GetForCurrentView().CommandsRequested += new TypedEventHandler<SettingsPane, SettingsPaneCommandsRequestedEventArgs>(SettingsPane_CommandsRequested);

            Window.Current.Activate(); // aktiváljuk az ablakot
        }