Package com.poker.shared

Examples of com.poker.shared.Rank


    if (state.getProcess() != 0) {
      ArrayList<Card> dealerCards = state.getDealerCards();
      for (int i = 0; i < 3; i++) {
        Suit suit = dealerCards.get(i).getSuit();
        serialized += "_" + suit.name() + "_";
        Rank rank = dealerCards.get(i).getRank();
        serialized += rank.name();
      }
      ArrayList<Card> player1Cards = state.getPlayers().get(0)
          .getPlayerCards();
      for (int i = 0; i < 3; i++) {
        Suit suit = player1Cards.get(i).getSuit();
        serialized += "_" + suit.name() + "_";
        Rank rank = player1Cards.get(i).getRank();
        serialized += rank.name();
      }
      ArrayList<Card> player2Cards = state.getPlayers().get(1)
          .getPlayerCards();
      for (int i = 0; i < 3; i++) {
        Suit suit = player2Cards.get(i).getSuit();
        serialized += "_" + suit.name() + "_";
        Rank rank = player2Cards.get(i).getRank();
        serialized += rank.name();
      }
    }

    if (state.getProcess() == 2) {
      Choose choose = state.getPlayers().get(0).getChoose();
View Full Code Here


        ArrayList<Card> player1Cards = new ArrayList<Card>();
        ArrayList<Card> player2Cards = new ArrayList<Card>();
        for (int i = 4; i < 9;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);

          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          dealerCards.add(card);
          i += 2;
        }
        state.setDealerCards(dealerCards);
        for (int i = 10; i < 15;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);
          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          player1Cards.add(card);
          i += 2;
        }
        state.setPlayerCards(0, player1Cards);
        for (int i = 16; i < 21;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);
          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          player2Cards.add(card);
          i += 2;
        }
        state.setPlayerCards(1, player2Cards);
View Full Code Here

    if (state.getProcess() != 0) {
      ArrayList<Card> dealerCards = state.getDealerCards();
      for (int i = 0; i < 3; i++) {
        Suit suit = dealerCards.get(i).getSuit();
        serialized += "_" + suit.name() + "_";
        Rank rank = dealerCards.get(i).getRank();
        serialized += rank.name();
      }
      ArrayList<Card> player1Cards = state.getPlayers().get(0)
          .getPlayerCards();
      for (int i = 0; i < 3; i++) {
        Suit suit = player1Cards.get(i).getSuit();
        serialized += "_" + suit.name() + "_";
        Rank rank = player1Cards.get(i).getRank();
        serialized += rank.name();
      }
      ArrayList<Card> player2Cards = state.getPlayers().get(1)
          .getPlayerCards();
      for (int i = 0; i < 3; i++) {
        Suit suit = player2Cards.get(i).getSuit();
        serialized += "_" + suit.name() + "_";
        Rank rank = player2Cards.get(i).getRank();
        serialized += rank.name();
      }
    }

    if (state.getProcess() == 2) {
      Choose choose = state.getPlayers().get(0).getChoose();
View Full Code Here

        ArrayList<Card> player1Cards = new ArrayList<Card>();
        ArrayList<Card> player2Cards = new ArrayList<Card>();
        for (int i = 4; i < 9;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);

          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          dealerCards.add(card);
          i += 2;
        }
        state.setDealerCards(dealerCards);
        for (int i = 10; i < 15;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);
          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          player1Cards.add(card);
          i += 2;
        }
        state.setPlayerCards(0, player1Cards);
        for (int i = 16; i < 21;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);
          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          player2Cards.add(card);
          i += 2;
        }
        state.setPlayerCards(1, player2Cards);
View Full Code Here

TOP

Related Classes of com.poker.shared.Rank

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.