akstoulil / Group-Project-1

First group project for Adv C++
0 stars 1 forks source link

Review Player Class #6

Open CrazyCarl78 opened 6 years ago

CrazyCarl78 commented 6 years ago

I wanted you guys to review my player class code to see if it is correct or if I need to add anything to it. I used the same variables as the main program. I apologize for not responding to emails. I will work on it from here on out.

class Player { protected: double chipsToBet; int card_total; bool playerChoice; double chipsToPlay; public: Player(double chipsToBet, int card_total, bool playerChoice, double chipsToPlay) { chipsToBet = 0.0; card_total = 0; playerChoice = 0; chipsToPlay = 0.0; }

double setchipsToBet(double b)
{
    chipsToBet = b;
}
int setCard_total(int t)
{
    card_total = t;
}
bool setPlayerChoice(bool p)
{
    playerChoice = p;
}
double setchipsToPlay(double ctp)
{
    chipsToBet = ctp;
}

double getchipsToBet() const
{
    return chipsToBet;
}

int getCard_total() const
{
    return card_total;
}

bool getPlayerChoice() const
{
    return playerChoice;
}
double getchipsToPlay() const
{
    return chipsToPlay;
}

};