Package com.javaflair.pokerprophesier.api.card

Examples of com.javaflair.pokerprophesier.api.card.Card


           
            //Check if the player is active (cards in their hand)
            if ( player.isActive() ) {
                //The player is active, create a HoleCards class for them and
                //assign their cards using the data from the input
                cards = new HoleCards( new Card( player.getCard(0).getRank(),
                                                 player.getCard(0).getSuit() ),
                                       new Card( player.getCard(1).getRank(),
                                                 player.getCard(1).getSuit() ) );
               
                //Check if the player has folded
                if ( player.getFolded() )
                    //This defaults to false, so only set if they have folded
View Full Code Here


        //engine cards to add to the community list
        for ( int ii = 0; ii < cards.size(); ii++ ) {
            //Get the next table data community card
            card = cards.get(ii);
            //Create a new engine card representation and add to the community
            communityCards.add( new Card( card.getRank(), card.getSuit() ) );   
        }
       
        //Use the # of cards in the array list to set the current street
        switch ( cards.size() ) {
            case TransportUtils.HOLE_CARDS_DEALT :
View Full Code Here

     * every player after the 1st has a 50% chance of folding.
     */
    private void setPlayerCards( ) {
        //Variables to store data in types used by the calc engine
        HoleCards cards;
        Card c1, c2;
        int p;
       
        //Create the HoleCards array used by the engine
        playerCards = new HoleCards[ totalPlayers ];
       
View Full Code Here

        //Build a deck of cards to randomly assign
        deck = new ArrayList<Card>();
        int c = 0;
        for ( int ii = 1; ii < 14; ii++ ) {
            for( int jj = 1; jj < 5; jj++ ) {
                deck.add( new Card( ii, jj ) );
                c++;
            }
        }
    }
View Full Code Here

        //Generate a random # between 0 and Cards left in deck -1 that
        //represents the position in the deck to select the next card from.
        int p = rand.nextInt( deck.size() );
       
        //Store the card to return
        Card res = deck.get(p);
       
        //Remove the card from the deck so it isn't used again. This will
        //automatically keep the random #s between 0 and the deck size - 1
        deck.remove(p);
       
View Full Code Here

TOP

Related Classes of com.javaflair.pokerprophesier.api.card.Card

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.