1 /*
2  * (c) Copyright 1997, Qun Zhang.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software
5  * and its documentation for any purpose is hereby granted without fee,
6  * provided that the above copyright notice appear in all copies and
7  * that both that copyright notice and this permission notice appear in
8  * supporting documentation, and that the name of Qun Zhang not be used
9  * in advertising or publicity pertaining to distribution of the software
10  * without specific, written prior permission.  Qun Zhang make no
11  * representations about the suitability of this software for any purpose.
12  * It is provided "as is" without express or implied warranty.
13  *
14  * THE ABOVE-NAMED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16  * EVENT SHALL THE ABOVE-NAMED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
18  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20  * PERFORMANCE OF THIS SOFTWARE.
21  *
22  */
23 
24 #ifndef Player_h
25 #define Player_h 1
26 
27 #include "Hands.h"
28 #include "Dealer.h"
29 
30 class Seat;
31 
32 class Player : public Hands
33 
34 {
35   public:
36       Player( Dealer*, Seat* seat);
~Player()37       virtual ~Player() { _dealer->Remove(this); }
38 
39 		virtual void NewGame();
40 		virtual void Progressive(int);
41 		virtual int  Progressive() const;
42       virtual void Ante  (int);
43 		virtual int  Ante     () const;
44       virtual void Check	 ();
45       virtual void Bet   (int);
46 		virtual int  Bet      () const;
47       virtual void Fold		 ();
48       virtual void Call  (int);
49       virtual void Raise (int);
50       virtual void Pay	 (int);
51       virtual void BankRoll(int);
52 		virtual int  BankRoll( ) const;
53               int  WinLost( ) const;
GetSeat()54 		Seat*			 GetSeat() const { return _seat; }
55   protected:
56 		virtual void  SortCards  () const;  //defauld sord plus redraw;
57 
58   private:
59       Player(const Player &right);
60       const Player & operator=(const Player &right);
61       int operator==(const Player &right) const;
62       int operator!=(const Player &right) const;
63 
64   private:  //## implementation
65 
66       Dealer *_dealer;
67       Seat *  _seat;
68 		int	  _bankroll;
69 		int	  _ante;
70 		int     _bet;
71 		int     _progressive;
72       int     _lastWinLost;
73 };
74 
WinLost()75 inline int Player::WinLost( ) const
76 {
77 	 return _lastWinLost;
78 }
79 
80 // Class Player
81 
82 #endif
83 
84 
85