Monte Carlo Simulation : Blackjack Card Game
(Please note: This outline will be revised in another day or so. Click here to visit Cathy's official Project Page for an updated version.)
List of classes:
Class 'CardGame' : Base class that contains all the general
member functions for a card game. You can design your own card game by inheriting from CardGame ,
class NewCardGame : public CardGame
{
};
and using the classes Deck_of_Cards, Card, and Player (see below.)
- Class 'Blackjack' : Derived from class 'CardGame'. Contains member
functions that are specific to the rules of Blackjack only. (This is my
way of incorporating inheritance into my project.)
- Class 'Player' : Contains the names and scores (or "money roll") for each player. Also saves the player information so that the user can "load" an old game. (I haven't decided yet where I should put the function load_game -- should it be with the Pl
ayer class or the CardGame class?)
- Class 'Deck_of_Cards' : Contains the information for a deck of cards.
- Class 'Card' : Contains the information for a single playing card. This class will also "draw" each player's hand of cards in ascii format. (If I am feeling really ambitious, maybe I will try to make XWindows popups that draw the cards! Ok, so mayb
e I don't do anything else with my spare time except sit in front of a computer!)
- Class 'RandomNumber' : At the heart of every Monte Carlo simulation is a random number generator. If time permits, I will make a general class which can return a random number with any user-specified probability distribution (i.e. exponential, gaussia
n, etc.) This would be extremely useful for Physics simulations that require random numbers. (To see why I'm not using the system-supplied random number generator, click here.)
Disclaimer -- This outline merely reflects my "grand visions" for a simple, yet entertaining and functional, card game. Any similarities to my final C++ project are purely the result of a lot of hard work and sleepless nights. Good luck to eve
ryone in the P231A class!
cohara@uci.edu