Saturday, August 18, 2007

Blackjack Game

Below is a description of my Blackjack Game project, which I've implemented:

Create a single-player Blackjack applet:
New players will be assigned a BlackJackHand with two Cards to start. They have the option to “hit” or “stay”. If the player busts, the round is over and a point goes to the dealer. When the player “stays”, the game will generate the dealer’s Hand, and indicate the results to the player. The user can play another round after a round is finished. A running tally of dealer and player wins is displayed, which can be reset.

To complete this assignment, you will need:
- a single applet (BlackjackApplet), which responds to “hit” and “stay” commands, and displays the game state
- a BlackJackGame class, that performs all the actions of the game (the applet will use this class)
- a Deck class (provided)

Tips:
- you will want to get card images from the web to use in your applet, or devise some graphical representation. A set (gif and png) is available at http://www.jfitz.com/cards/
- test your BlackJackGame class with a text console interface first, prior to building the applet. That is, create a BlackJackConsole class that provides a console interface to BlackJackGame.
- use your own implementations of Card, BlackJackHand and Hand if possible. Either way, these classes must be used in your project.

Marking:
- all source code exists and compiles. The application runs and provides the required features. Code is commented using javadoc in the manner required for the course.
- the logic for the game is in BlackJackGame and BlackJackHand. Basic card playing support functionality is in Deck, Hand and Card. UI details are in BlackJackApplet.
- A web page should be provided for the applet. The applet should work properly when the page is opened in a browser. The webpage, applet, supporting bytecode and files should be easily transferred to a different location on your filesystem and still work properly (i.e. do not hard-code absolute paths or operating-system-specific path separators).

No comments: