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 #include <iostream>
25 #include "Dealer.h"
26 #include "Deck.h"
27 #include "Player.h"
28 #include "Table.h"
29 
30 using namespace std;
31 
32 
main(int argc,char ** argv)33 int main(int argc, char ** argv)
34 {
35 	 try{
36 		 Table table(argc, argv);
37 		 Deck  deck(52);
38 
39 		 deck.Wash();
40 		 deck.Shuffle();
41 		 deck.Cut();
42 		 deck.Shuffle();
43 		 deck.Cut();
44 		 deck.Shuffle();
45 		 deck.Cut();
46 		 deck.Cut();
47 
48 		 table.GetDealer()->SetDeck(&deck);
49 		 table.Start();
50 	 }
51     catch (char *msg)
52     {
53 		cout << msg << endl;
54     }
55 }
56