public void TestInitialize()
        {
            this.uiMapper = new CardMapperForUI();

            twoOfClubs = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Clubs,
                Rank = 1
            };
            tenOfClubs = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Clubs,
                Rank = 9
            };
            jackOfDiamonds = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Diamonds,
                Rank = 10
            };
            fiveOfDiamonds = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Diamonds,
                Rank = 4
            };
            kingOfHearts = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Hearts,
                Rank = 12
            };
            aceOfHearts = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Hearts,
                Rank = 13
            };
            eightOfSpades = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Spades,
                Rank = 7
            };
            sevenOfSpades = new CardBusinessLogic
            {
                Suit = VideoPokerGameApp.Models.Enums.CardSuit.Spades,
                Rank = 6
            };
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            TextReader       inputReader                = Console.In;
            IGameInterface   gameInterface              = new GameInterface(NUMBER_OF_CARDS_IN_HAND);
            ICardShuffler    shuffler                   = new CardShuffler();
            ICardDealer      cardDealer                 = new CardDealer(NUMBER_OF_CARDS_IN_DECK, shuffler);
            ICardMapper      cardMapper                 = new CardMapper();
            ICardMapperForUI cardMapperForUI            = new CardMapperForUI();
            Hand             hand                       = new Hand(NUMBER_OF_CARDS_IN_HAND);
            IEvaluator       evaluator                  = new Evaluator(cardMapper);
            CombinationNameAndPayoutMapper resultMapper = new CombinationNameAndPayoutMapper();

            Game game = new Game(
                inputReader,
                gameInterface,
                cardDealer,
                cardMapper,
                cardMapperForUI,
                hand,
                evaluator,
                resultMapper);

            game.PlayGame();
        }