public with_a_deal_in_cards_action()
        {
            double_down_spec = MockRepository.GenerateStub<ICanDoubleDown>();
            split_spec = MockRepository.GenerateStub<ICanSplit>();
            insurance_spec = MockRepository.GenerateStub<ICanTakeInsurance>();

            card_shoe = MockRepository.GenerateStub<ICardShoe>();
            positions = MockRepository.GenerateStub<IPlayingPositions>();

            player = MockRepository.GenerateStub<IPlayer>();

            players_hand = MockRepository.GenerateStub<IPlayersHand>();
            positions.Stub(x => x.players_active_hand).Return(players_hand);
            dealers_hand = MockRepository.GenerateStub<IDealersHand>();
            positions.Stub(x => x.dealers_hand).Return(dealers_hand);

            hand = MockRepository.GenerateStub<IHand>();
            hands = new List<IHand>() { hand };
            positions.Stub(x => x.all_hands).Return(hands);

            hand_status_factory = MockRepository.GenerateStub<IHandStatusFactory>();
            annouce_winner_action = MockRepository.GenerateStub<IAnnouceWinnerAction>();

            SUT = new Domain.GamePlay.Model.Dealer.Actions.DealCardsIn(hand_status_factory, 
                                                                       annouce_winner_action,
                                                                       double_down_spec,
                                                                       split_spec,
                                                                       insurance_spec);
        }
Пример #2
0
        public with_a_deal_in_cards_action()
        {
            double_down_spec = MockRepository.GenerateStub <ICanDoubleDown>();
            split_spec       = MockRepository.GenerateStub <ICanSplit>();
            insurance_spec   = MockRepository.GenerateStub <ICanTakeInsurance>();

            card_shoe = MockRepository.GenerateStub <ICardShoe>();
            positions = MockRepository.GenerateStub <IPlayingPositions>();

            player = MockRepository.GenerateStub <IPlayer>();

            players_hand = MockRepository.GenerateStub <IPlayersHand>();
            positions.Stub(x => x.players_active_hand).Return(players_hand);
            dealers_hand = MockRepository.GenerateStub <IDealersHand>();
            positions.Stub(x => x.dealers_hand).Return(dealers_hand);

            hand  = MockRepository.GenerateStub <IHand>();
            hands = new List <IHand>()
            {
                hand
            };
            positions.Stub(x => x.all_hands).Return(hands);

            hand_status_factory   = MockRepository.GenerateStub <IHandStatusFactory>();
            annouce_winner_action = MockRepository.GenerateStub <IAnnouceWinnerAction>();

            SUT = new Domain.GamePlay.Model.Dealer.Actions.DealCardsIn(hand_status_factory,
                                                                       annouce_winner_action,
                                                                       double_down_spec,
                                                                       split_spec,
                                                                       insurance_spec);
        }
Пример #3
0
 public bool is_satisfied_by(IDealersHand dealers_hand)
 {
     return((_hand_scorer.calculate_score_for(dealers_hand) < _dealers_hit_limit) && dealers_hand.turn_ended() == false);
 }
Пример #4
0
 public bool is_satisfied_by(IDealersHand dealers_hand)
 {            
     return (_hand_scorer.calculate_score_for(dealers_hand) < _dealers_hit_limit) && dealers_hand.turn_ended() == false;
 }