#ifndef _BET_H #define _BET_H // abstract bet class // // Owen Astrachan 5/4/97 // // string description() const // -- returns a description of the bet for players to read // // int deltaMoney() const // -- returns amount of money that results from bet, // for a less this is -1 * amount bet, for a win this // is the amount of money by which a bankroll increases // // void placeBet(const BankRoll & br) // -- allows user to place a bet, checks that bankroll can cover bet // subclasses should override this function to process subclass // specific data entry, e.g., red/black. The Bet::placeBet // function should be called to determine how much money to bet // // bets that can't be covered (or are negative) are set to zero #include "CPstring.h" // forward declare classes (references used) class BankRoll; class Wheel; class Bet { public: Bet(Wheel & w); virtual ~Bet(){} virtual string description() const = 0; virtual int deltaMoney() const = 0; virtual void placeBet(const BankRoll & br); protected: Wheel & myWheel; // wheel used to determine if bet wins int myBetAmount; // amount bet }; #endif