public Game()
        {
            m_observers = new List<PlayerHandChangedObserver>();

            m_dealer = new Dealer(new rules.RulesFactory());
            m_player = new Player();

            //subscribe to dealer events (when cards are dealed)
            m_dealer.AddSubscriber(this);
        }
 public void AddSubscribers(ICardDealObserver a_sub)
 {
     m_dealer.AddSubscriber(a_sub);
     m_player.AddSubscriber(a_sub);
 }
Beispiel #3
0
 public void AddSubscriber(controller.PlayGame a_gamePlay)
 {
     m_dealer.AddSubscriber(a_gamePlay);
 }
Beispiel #4
0
 public void SubscribeToCardDrawn(IObserver a_observer)
 {
     m_dealer.AddSubscriber(a_observer);
     m_player.AddSubscriber(a_observer);
 }
Beispiel #5
0
 public void AddSubscriber(IBlackJackObserver a_sub)
 {
     m_dealer.AddSubscriber(a_sub);
 }
Beispiel #6
0
 public void AddSubscriber(BlackJack.controller.PlayGame obj)
 {
     m_dealer.AddSubscriber(obj);
 }
Beispiel #7
0
 public void AddSubscriber(ICardRecievedObserver a_sub)
 {
     m_player.AddSubscriber(a_sub);
     m_dealer.AddSubscriber(a_sub);
 }
Beispiel #8
0
 //
 public void AddSubscriber(IObserver a_sub)
 {
     m_player.AddSubscriber(a_sub);
     m_dealer.AddSubscriber(a_sub);
 }
Beispiel #9
0
 public void AddObserver(BlackJackObserver blackJackObserver)
 {
     m_dealer.AddSubscriber(blackJackObserver);
 }
Beispiel #10
0
 // Added code.
 public void AddSubscriber(IDealCardsObserver subscriber)
 {
     m_player.AddSubscriber(subscriber);
     m_dealer.AddSubscriber(subscriber);
 }
Beispiel #11
0
 public void AddSubscriberToPlayer(ICardDealtObserver observer)
 {
     m_player.AddSubscriber(observer);
     m_dealer.AddSubscriber(observer);
 }