예제 #1
0
파일: Hand.java 프로젝트: Migals/Lab-2
	public Hand(Deck d) {
		ArrayList<Card> Import = new ArrayList<Card>();
		for (int x = 0; x < 5; x++) {
			Import.add(d.drawFromDeck());
		}
		CardsInHand = Import;

	}
예제 #2
0
파일: Hand.java 프로젝트: apgross1/Lab5
  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);
  }