protected override ISantaseGame CreateGame() { IPlayer firstPlayer = new SmartPlayer(); IPlayer secondPlayer = new SmartPlayer(); ISantaseGame game = new SantaseGame(firstPlayer, secondPlayer); // new ConsoleLogger("[game] ")); return game; }
protected override ISantaseGame CreateGame() { IPlayer firstPlayer = new SmartPlayer(); // new PlayerWithLoggerDecorator(new SmartPlayer(), new ConsoleLogger("[-]")) IPlayer secondPlayer = new SmartPlayerOld(); ISantaseGame game = new SantaseGame(firstPlayer, secondPlayer); // new ConsoleLogger("[game] ")); return game; }
// ReSharper disable once UnusedMember.Local private static ISantaseGame CreateGameVersusBot() { Console.BufferHeight = Console.WindowHeight = 17; Console.BufferWidth = Console.WindowWidth = 50; IPlayer firstPlayer = new SmartPlayer(); IPlayer secondPlayer = new SmartPlayer(); ISantaseGame game = new SantaseGame(firstPlayer, secondPlayer); return game; }
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()); }