public MainPage() { this.InitializeComponent(); if (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Desktop") { this.AdRow.Height = new GridLength(90); // this.AdMediator_2D55AF.Height = 90; // this.AdMediator_2D55AF.Width = 768; } else { this.AdRow.Height = new GridLength(80); // this.AdMediator_2D55AF.Height = 80; // this.AdMediator_2D55AF.Width = 480; } this.playerCardControls = new[] { this.PlayerCard1, this.PlayerCard2, this.PlayerCard3, this.PlayerCard4, this.PlayerCard5, this.PlayerCard6 }; this.uiPlayer = new UiPlayer(); this.uiPlayer.RedrawCards += this.UiPlayerRedrawCards; this.uiPlayer.RedrawTrumpCard += this.UiPlayerRedrawTrumpCard; this.uiPlayer.RedrawNumberOfCardsLeftInDeck += this.UiPlayerOnRedrawNumberOfCardsLeftInDeck; this.uiPlayer.RedrawPlayerPlayedCard += this.UiPlayerOnRedrawPlayerPlayedCard; this.uiPlayer.RedrawOtherPlayerPlayedCard += this.UiPlayerOnRedrawOtherPlayerPlayedCard; this.uiPlayer.RedrawCurrentAndOtherPlayerRoundPoints += this.UiPlayerOnRedrawCurrentAndOtherPlayerRoundPoints; this.uiPlayer.RedrawCurrentAndOtherPlayerTotalPoints += this.UiPlayerOnRedrawCurrentAndOtherPlayerTotalPoints; this.uiPlayer.RedrawPlayedCards += this.UiPlayerOnRedrawPlayedCards; this.uiPlayer.GameClosed += this.UiPlayerOnGameClosed; this.uiPlayer.GameEnded += this.UiPlayerOnGameEnded; IPlayer smartPlayer = new SmartPlayer(); this.game = new SantaseGame(this.uiPlayer, smartPlayer); this.PlayerCard.Transparent(); this.OldPlayerCard.Transparent(); this.OtherPlayerCard.Transparent(); this.OldOtherPlayerCard.Transparent(); Task.Run(() => this.game.Start()); }
public MainPage() { this.InitializeComponent(); if (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Desktop") { this.AdRow.Height = new GridLength(90); this.AdMediator_2D55AF.Height = 90; this.AdMediator_2D55AF.Width = 768; } else { this.AdRow.Height = new GridLength(80); this.AdMediator_2D55AF.Height = 80; this.AdMediator_2D55AF.Width = 480; } this.playerCardControls = new[] { this.PlayerCard1, this.PlayerCard2, this.PlayerCard3, this.PlayerCard4, this.PlayerCard5, this.PlayerCard6 }; this.uiPlayer = new UiPlayer(); this.uiPlayer.RedrawCards += this.UiPlayerRedrawCards; this.uiPlayer.RedrawTrumpCard += this.UiPlayerRedrawTrumpCard; this.uiPlayer.RedrawNumberOfCardsLeftInDeck += this.UiPlayerOnRedrawNumberOfCardsLeftInDeck; this.uiPlayer.RedrawPlayerPlayedCard += this.UiPlayerOnRedrawPlayerPlayedCard; this.uiPlayer.RedrawOtherPlayerPlayedCard += this.UiPlayerOnRedrawOtherPlayerPlayedCard; this.uiPlayer.RedrawCurrentAndOtherPlayerRoundPoints += this.UiPlayerOnRedrawCurrentAndOtherPlayerRoundPoints; this.uiPlayer.RedrawCurrentAndOtherPlayerTotalPoints += this.UiPlayerOnRedrawCurrentAndOtherPlayerTotalPoints; this.uiPlayer.RedrawPlayedCards += this.UiPlayerOnRedrawPlayedCards; this.uiPlayer.GameClosed += this.UiPlayerOnGameClosed; this.uiPlayer.GameEnded += this.UiPlayerOnGameEnded; IPlayer smartPlayer = new SmartPlayer(); this.game = new SantaseGame(this.uiPlayer, smartPlayer); this.PlayerCard.Transparent(); this.OldPlayerCard.Transparent(); this.OtherPlayerCard.Transparent(); this.OldOtherPlayerCard.Transparent(); Task.Run(() => this.game.Start()); }
public MainPage() { this.InitializeComponent(); this.ProgramVersion.Text = "Santase v2.0"; this.InitializeAdControl(); this.resultPersister = new TotalResultPersister(); this.TotalResult.Text = $"{this.resultPersister.PlayerScore}-{this.resultPersister.OtherPlayerScore}"; this.playerCardControls = new[] { this.PlayerCard1, this.PlayerCard2, this.PlayerCard3, this.PlayerCard4, this.PlayerCard5, this.PlayerCard6, }; this.uiPlayer = new UiPlayer(); this.uiPlayer.RedrawCards += this.UiPlayerRedrawCards; this.uiPlayer.RedrawTrumpCard += this.UiPlayerRedrawTrumpCard; this.uiPlayer.RedrawNumberOfCardsLeftInDeck += this.UiPlayerOnRedrawNumberOfCardsLeftInDeck; this.uiPlayer.RedrawPlayerPlayedCard += this.UiPlayerOnRedrawPlayerPlayedCard; this.uiPlayer.RedrawOtherPlayerPlayedCard += this.UiPlayerOnRedrawOtherPlayerPlayedCard; this.uiPlayer.RedrawCurrentAndOtherPlayerRoundPoints += this.UiPlayerOnRedrawCurrentAndOtherPlayerRoundPoints; this.uiPlayer.RedrawCurrentAndOtherPlayerTotalPoints += this.UiPlayerOnRedrawCurrentAndOtherPlayerTotalPoints; this.uiPlayer.RedrawPlayedCards += this.UiPlayerOnRedrawPlayedCards; this.uiPlayer.GameClosed += this.UiPlayerOnGameClosed; this.uiPlayer.GameEnded += this.UiPlayerOnGameEnded; IPlayer smartPlayer = new SmartPlayer(); this.game = new SantaseGame(this.uiPlayer, smartPlayer); this.PlayerCard.Transparent(); this.OldPlayerCard.Transparent(); this.OtherPlayerCard.Transparent(); this.OldOtherPlayerCard.Transparent(); Task.Run(() => this.game.Start()); }