Write a algoritm to play blackjack , JAVA Programming

Draw: loops through the list of cards drawing them in a single row starting from the screen position referred to by the 'x' and 'y' fields of the Hand class. You can limit the number of simultaneously displayed cards to 10.

Review the definition of the Deck class. Note that the deck is modeled as an array 'cards' of size 52 (the number of cards in a single deck) initialized with the cards for all possible combinations of the card's rank and suit. Implement the following method of the Deck class:

Shuffle: produce a random permutation of the cards in the 'cards' array. Use the random

number generator accessible through the 'rng' field of the Deck class.  Note that the most efficient implementation of the Shuffle method will traverse the array only once, and use constant memory. Think of how you can do this, but do not obsess with it. We are not going to deduct points for less efficient implementations!

Finally, implement the game logic by filling out the content of the if-else statements in the Update method of the BlackJack class. The template assumes that the game logic is modeled as the state diagram below. You are welcome to implement a different state diagram as long as the game logic  detailed above stays the same.

1019_Write a algoritm to play Blackjack.png

You will need to think what logic should execute within each state, and in response to the buttons being pressed. Use the 'Pressed' attribute of the Button class to check the status of an instance of the button (pressed or not). For example, hitButton.Pressed will return true if and only if the "Hit" button has been pressed.

The game logic must support a simple scoring system in which the player is awarded 1 point for each game being won, and deducted 1 point for each game being lost. For example, the score of -1 may result from the player winning 5 and loosing 6 games respectively.

Posted Date: 4/24/2013 1:28:45 AM | Location : United States







Related Discussions:- Write a algoritm to play blackjack , Assignment Help, Ask Question on Write a algoritm to play blackjack , Get Answer, Expert's Help, Write a algoritm to play blackjack Discussions

Write discussion on Write a algoritm to play blackjack
Your posts are moderated
Related Questions
Describe The ? operator in Java langauge? The conditional operator just works for assigning a value to a variable, using a value within a method invocation, or in a few other w

Explain the term- Comparing Strings For comparing Strings never use == operator, use equals method of String class. - == operator compares addresses (shallow comparison) whi

The fancy new French restaurant La Food is very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of the

What are the different types of messages available in the JMS API? Ans) Message, TextMessage, BytesMessage, StreamMessage, ObjectMessage, MapMessage are the dissimilar messages

Write down HTML or JavaScript code for the following requirements: Declare an Array along with the identifier SUBJECT having length 5. Assign subsequent values to the array par

For this assignment you'll create some classes for modeling tickets for a city subway system. The type of system we are modeling has these main features: Stations are grouped in

Develop a java/html5 based game Project Description: I want a game designed that mostly allows users to bid a certain amount of dogecoin and depending on how far they get in

.java coding for linear programming

Introduction As an alternative to the Binary Search algorithm, also it could be done by the brute-force method given below. public static int rank(int key, int[] a) {     f

Explain The Applet in java? The reason people are excited about Java as more than just another OOP language is because it allows them to write interactive applets on the web.