vendredi 10 août 2018

(Java)The checkPair function in my third if statement is returning false but the if statement is executing

This is for a poker App and the third if statement has been testing and prints false yet when i run the code that if statement is executing.

Thanks for the Help.

    for(int i = 0; i < hands; i++) {
        roundCounter++;
    if(roundCounter % 2 != 0){

        int playerBet = 0;
        double pot = 0.0;
        if(botStack != 0) {
            botStack = botStack - blind;
            buyIn = buyIn - smallBlind;
            if(checkPair = true) {
                double botBet = botStack * pairBetMultiplyer;
                botStack = botStack - botBet;
                pot = botBet + blind + smallBlind;
                System.out.println("The Dealer Bet: $" + botBet);
                System.out.println("Pot: $" + pot);
            }
            else if(checkOneHighCards = true){
                double botBet3 = (botStack * .04);
                botStack = botStack - botBet3;
                pot = botBet3 + blind + smallBlind;
                System.out.println("The Dealer Bets: $" + botBet3);
                System.out.println("Pot: $" + pot);
            }

Aucun commentaire:

Enregistrer un commentaire