Example #1
0
	public Hand(Deck d) {
		ArrayList<Card> Import = new ArrayList<Card>();
		for (int x = 0; x < 5; x++) {
			Import.add(d.drawFromDeck());
		}
		CardsInHand = Import;

	}
Example #2
0
  public Hand(Deck d) {
    playerHand = new GamePlayPlayerHand();
    ArrayList<CardDomainModel> Import = new ArrayList<CardDomainModel>();
    if (playerHand.getGame().getGame() == pokerEnums.eGame.FiveStud
        || playerHand.getGame().getGame() == pokerEnums.eGame.FiveStudOneJoker
        || playerHand.getGame().getGame() == pokerEnums.eGame.FiveStudTwoJoker) {
      for (int x = 0; x < 5; x++) {
        Import.add(d.drawFromDeck());
      }
    } else if (playerHand.getGame().getGame() == pokerEnums.eGame.TexasHoldEm) {
      for (int x = 0; x < 2; x++) {
        Import.add(d.drawFromDeck());
      }
      for (int i = 0; i < 4; i++) {
        if (i == 0) {
          d.drawFromDeck();
        } else communityCards.add(d.drawFromDeck());
      }
    } else if (playerHand.getGame().getGame() == pokerEnums.eGame.Omaha) {
      for (int x = 0; x < 4; x++) {
        Import.add(d.drawFromDeck());
      }

      for (int i = 0; i < 4; i++) {
        if (i == 0) {
          d.drawFromDeck();
        } else communityCards.add(d.drawFromDeck());
      }
    }
    setCardsInHand(Import);
  }