#include #include "bet.h" #include "bankroll.h" Bet::Bet(Wheel & w) : myWheel(w), myBetAmount(0) // postcondition: 0 dollars bet { } void Bet::placeBet(const BankRoll & br) // postcondition: player's bet is recorded // bad bets set to zero { br.report(); cout << "how much to bet? "; cin >> myBetAmount; if (myBetAmount < 0) { cout << "can't bet negative" << endl; myBetAmount = 0; } else if (! br.isBetOk(myBetAmount)) { cout << "that bet can't be covered" << endl; myBetAmount = 0; } }