public MainPage()
 {
     this.InitializeComponent();
     this.NavigationCacheMode = NavigationCacheMode.Required;
     this.navigationHelper = new NavigationHelper(this);
     this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
     this.navigationHelper.SaveState += this.NavigationHelper_SaveState;
 }
        public GameField()
        {
            this.InitializeComponent();
            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;


            gameEngine = new GameEngine();
            gameEngine.FieldCardsChanged += GameEngine_OnFieldCardsChanged;
            gameEngine.WrongCardPlayed += GameEngine_OnWrongCardPlayed;
            gameEngine.TroefChanged += GameEngine_OnTroefIsChanged;
            gameEngine.GameIsOver += GameEngine_OnGameIsOver;
            gameEngine.RoundIsOver += GameEngine_OnRoundIsOver;
            gameEngine.ShouldMakeTroef += GameEngine_OnShouldMakeTroef;
            gameEngine.PlayerDealedNewCard += GameEngine_OnPlayerDealedNewCard;
            gameEngine.ComputerDealedNewCard += GameEngine_OnComputerDealedNewCard;
            gameEngine.TurnIsOver += GameEngine_OnTurnIsOver;
            gameEngine.StartNewRound();
        }