Simulation is an important application area in Engineering involving the development of computer models to provide insight into real-world events. This problem involves the simulation of a simple card game Strip Jack Naked.
3 Overview
For this assignment you are to implement the card game Strip Jack Naked sometimes known as Beggar My Neighbour or Beat Your Neighbour Out Of Doors. The original game rules can obtained from [1] The game is played as follows
A standard deck is shuffled and dealt face down to the two players, the first card to the non-dealer, the second to the dealer, and so on until each player has 26 cards. The dealer receives the last card. A standard deck (or pack) of cards contains 52 cards. These are divided into 4 suitsSpades, Hearts, Diamonds and Clubs.
Within each suit there are 13 cardsAce (A), 29, Ten (T), Jack (J), Queen (Q) and King (K). Players take turns to expose their top card. The non-dealer starts the game by playing the top card of their deck (the second last card dealt) face up on the table. The dealer then covers it by playing their top card face up, thus forming a pile of cards on the table. Play continues in this fashion until a pay card (Ace, King, Queen or Jack) is played. The next player must then pay for that card, by playing several times in succession. The payment rates are:
4 cards for an ace 3 cards for a king 2 cards for a queen 1 card for a jack
If a pay card is played at any stage during this sequence, the previous pay card is cancelled and play switches and the other player must pay for that card. When this sequence has ended, the player who exposed the last pay card takes the entire pile, placing it face down under their existing deck. She then starts the next round by playing one card face up as before. Play continues until one player cannot play when called upon to do so, because they have no more cards. The player who first runs out of card loses.
4 Requirements
The student shall define, develop, document, prototype, test and modify as required the software system.
The system shall: implement that card game Strip jack Naked as described above including: o shuffling the cards; o dealing the cards; o paying for a card;
prompt the user, in this order, for: o the number of games to simulate o the number of shuffles to perform on the deck
be a console based Java application (no GUI dialogues etc). be called StripJackNaked be written in Java be executed by typing the following: java StripJackNaked run on a Engineering Common First Year Laboratory Machine at the completion of all games, display to the screen a summary of the games. The format of the output is as follows (These numbers are fictitious, that is they are made them up):
Simulation Statistics Number of Shuffles : 35 Number of Games : 35 Total Turns : 7689 Turns Per Game : 219.69 Win Ratio (P1:P2) : 21:14 Payout Ratio (P1:P2) : 1245:3456 Average Cards Paid : 135 Average Cards In Hand : 48
what about thinking for a while and coding something that implements that specification?
Maybe if and when you get up to SPECIFIC problems about details people might be willing to assist you with hints about how to solve those, but please don't insult us by asking us to reduce the quality of the average programmer by making more idiots who don't know an int from a float to enter the profession by doing your entire homework for you.