Implement a game called bunko-poker

Assignment Help JAVA Programming
Reference no: EM13166734

Implement a game called Bunko-Poker. The gameplay is an easily programmed version of the popular game Yahtzee. Your program will make use of the supplied static functions Dice.roll() and, in cases where you might need the string ordered, Dice.ordered(String), to perform the operation of "throwing the dice". You will have to construct your code so that it will simulate a complete game of Bunko-Poker.
In the game of Bunko-Poker, you roll the dice first looking for ones. If one or more of the five dice are a one, then you add up the number of ones. This total is the initial "hand score". You then take the "hand" and look for poker-style hands (described in the table below). If you have any of the poker hands, you will modify the hand score by the appropriate value from the table below. The resulting score is your adjusted hand score for that particular roll of the dice. You roll again and if you get ones again, you repeat the procedure and add the adjusted hand score for this roll to the adjusted hand score from the prior roll to get your total score. If you do not get a one, then you move on to twos. You roll again and if you get twos, you add them up and then repeat the procedure to calculate the adjusted hand score. You keep rolling for a particular number until you roll the dice and do not get that number (the example run below will help clarify this). You keep repeating the procedure until you complete rolling for sixes.
Hand Name Sample Dice Roll Example Dice String   Hand Score ModificationFive of a Kind 4 4 4 4 4    44444   + 100Straight   1 2 3 4 5 12345 + 80Small Straight 1 2 3 4 6   12346 + 70Four of a Kind 3 5 5 5 5    35555   + 60Full House 4 4 1 1 1 44111   + 50Three of a Kind 4 4 4 2 3 44423 + 30Two Pair   4 4 2 2 5 44225   + 20Pair 3 3 2 4 6 33246   + 10Nothing   1 2 3 5 6 12356   + High Card
You should make heavy use of methods in your program. All of your method definitions should follow the main method. Private boolean methods (each taking a String argument) should be used to defined and utilized to determine what poker hands you have:

  • fiveOfAKind straight smallStraight fourOfAKind fullHouse threeOfAKind twoPair pair

 

 

Reference no: EM13166734

Questions Cloud

How many shares of common stock : How many shares of common stock are issued and how many shares of common stock are outstanding?
Explain a buffer solution is prepared by dissolving : A buffer solution is prepared by dissolving 1.50g each of benzioc acid C6H5CO2H and sodium benzoate NaC6H5CO2 in 150.0mL of solution.
8-bit registers are there in the intel 80x86 cpu design : In total, how many 8-bit registers are there in the Intel 80x86 CPU design presented in class? Name one of these 8-bit registers.
Draw pictures of the list names afte : Draw pictures of the list names after each line of the following code. Show the head pointer of the list, and the values and next pointers of every node. Draw pointers as arrows, and the null pointer as a slash or X. You may assume the list is sin..
Implement a game called bunko-poker : Implement a game called Bunko-Poker. The gameplay is an easily programmed version of the popular game Yahtzee. Your program will make use of the supplied static functions Dice.roll() and, in cases where you might need the string ordered, Dice.ordered..
Is problem solving easier and more effective in solving : Is problem solving easier and more effective in solving business problems without information systems or with? (justify your position)
Develop should take a message given as a command : The program you develop should take a message given as a command line argument and append it to a file (also specified on the command line). The file should have no permissions, both before and after the message is appended. Of course, the file sh..
Linked list with first node pointer p. : Complete the code for a function that replaces each occurrence of value x by value y in a linked list with first node pointer p.
Prepare a quarterly income statement : Prepare a quarterly income statement, a statement of retained earnings, and a balance sheet and journalize and post the adjusting entries. In the ledger accounts ( T-accounts), indicate the adjusting entries with an A.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Java application that asks a user to enter two integers

Write a Java application that asks a user to enter two integers (A and B) and then display the results of A/B. Catch any division by zero errors and prompt the user to reenter the value of B. Be sure your code compiles and runs as expected. Name your..

  Write specifications for method which advances date by one

Write specifications for the method which advances any given date by one day. Comprise a statement of purpose, pre- and post-conditions, and description of parameters.

  Achieve these two important features

Java TM is a portable language, and being an object-oriented programming language, it also encourages component reusability. How does Java TM achieve these two important features

  Determine the decision of java

Determine the decision of Java as the platform to develop this program. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utiliz..

  Write a java loop

write a java loop ( of your choice ) that produces exactly the following output to the screen: 2-4-6-8-

  The menu is displayed and the user must select

The menu is displayed and the user must select an option (a number between 0 and 7). The action corresponding to the selection is performed, then the menu is displayed again and the user can choose another option.

  What makes a program easy to modify

Describe the order of magnitude of the code section using Big(O) notation and Explain the relationship between dynamic storage allocation and recursion.

  Productexception class whose constructor

Create a ProductException class whose constructor receives a String that consists of a product number and price. Save the file as ProductException.java. Create a Product class with two fields, productNum and price. The Product constructor requires va..

  Dangerousmonster which inherits the monster

An interface - DangerousMonster which inherits the Monster interface and has a method called destroy() with void return type.(Note: Just like a class can inherit from another class, an interface can inherit from another interface using the "extends..

  Die class that can hold an integer

Design a die class that can hold an integer from 1 to 6. use the dice class to create a dice game. in this game, the user chooses a number between 2 and 12 inclusive

  Writing a program that parses

The programming project involves writing a program that parses, using recursive descent, a GUI definition language defined in an input file and generates the GUI that it defines.

  A method with the signature public static void

A method with the signature public static void printDetails(City[] cities) that will iterate through the cities and printthe details of the city using the displayDetails(...) method.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd