Chuck-A-Luck is a simple gambling game that is played using three dice. In general, before the dice are rolled a player can place one or more bets on the outcome of the roll. The dice are then rolled and the bets are processed.
For this exam, you will write a program using Java components in the MVC design pattern, HTML, CSS and Java classes that will allow a user to play a single player version of the game ChuckALuck.
You can read about the game of Chuck-A-Luck at the following Web sites. You can visit other sites if you wish. Keep in mind that these are for general background, your solution should follow the MIST7570 Chuck-A-Luck variation described below. Remember, you are not likely to be able to write a program for a problem if you don't fully understand the problem before you program it.
Use the following game rules for our Chuck-A-Luck variation. These variations from the usual rules are provided to reduce the scope of the program and make it a little easier for you to develop the game using the components you currently know how to use and to complete during the time allowed.
For your program, you must create an Eclipse project that contains Java classes, tsp pages or servlets combined in the MVC design pattern for each use case, CSS file(s), HTML, and images.
MVC: You must implement the controller/view using the MVC design pattern. You will need at least one set of MVC components for each of the different use cases (except for the index.jsp that provides the opening splash page).
Java Classes: Your solution should include two Java class that are used by your Controller/View components. One Java class (Die) has been provided along with these instructions. You may import this into your project and use it as is, or you may alter the Die Class if you want, or you may write your own from scratch. Your solution should include a second Java class with methods that help you run the game.
CSS file: Your solution should include CSS to style the pages. Your design can be similar to that shown in my figures but you should put your own design twists on the views. You should include enough here to demonstrate that you can use CSS for:
Dice images: A set of dice images are provided along with these instructions. Feel free to use these as part of our program. Remember that they need to be imported into the appropriate location of your Eclipse project in order to work with your program.
Note: This section will best be understood after you have researched the game of Chuck-A-Luck and thoroughly read the instructions above. It is provided as an example. Your solution should have the main elements shown here, but you may have a different look and feel (style - CSS). In fact, you should use your own design.
Opening page (view 1):
Figure 1 provides a view of the opening screen. Note, that you are not required to copy the style from these examples.
Figure 1 - Opening page (view 1) see image.
Bet page (view 2):
In Figure 2, the player has clicked Play from the opening screen to start the game or has continued play after previous rounds. This page presents the betting options. The user can: select bet types, add any additional information needed (like die selection for the Single bet), and enter bet amounts for each type selected.
Figure 2 - Deal page (view 2) see image.
Roll page (view 3):
In Figure 3 we see the results of a single roll of the dice. Several messages are provided about the outcome of each bet. Note that for this example, only three bet types were selected so there are correspondingly three outcome messages. The number of messages should vary with the number of bet types shown (could be any number of messages from 1 to 5). You should also indicate: the overall winnings/losses for the roll; the updated purse, and the number of rolls played this session.
Figure 3 - Reveal page with a bet results (view 3) see image.
Final Results page (view 4):
In Figures 4, we see an example of the final results page. Appropriate messages about the results and the final status of the player's purse are displayed. The player can choose to play again.
Figure 4 - Final Results (view 4) see image.