Package com.svanloon.game.wizard.core.card

Examples of com.svanloon.game.wizard.core.card.Deck


  private Score overallScores = new Score();
  private GameEventBroadcaster gameEventNotifier = new GameEventBroadcaster();
 
  private Card dealCards(int round, int dealer, int lead) {
    //Deck deck = new Deck(new PokerCardFinder());
    Deck deck = new Deck(cardFinder);
    deck.shuffle();
    for (int i = 0; i < round; i++) {
      for (Player player: new PlayerIterator(_playerCollection, lead)) {
        player.giveCard(deck.getCard());
      }
    }
    Player dealerPlayer = this._playerCollection.get(dealer);
    gameEventNotifier.notify(new HandDealtEvent(dealerPlayer.getId()));

    if (deck.hasCards()) {
      return deck.getCard();
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of com.svanloon.game.wizard.core.card.Deck

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.