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

  The comparedto method

the comparedTo method. This is the course class I do not understand how to do the compared to method. I need to order the course first by department then by the course number.

  Create and code a program uses three parallel numeric array

Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays. The program should prompt the user to enter a ProductID. Valid P..

  Identify the 5 code elements

Identify the 5 code elements for a Password class. Things like: class, instance, and final variables, accessor and mutator method, public and private specifiers for methods and member variables.i need to provide detail and descriptions for each code ..

  What is the minimal total weight of cylinders

A scuba diver uses a special equipment for diving. He has a cylinder with two containers: one with oxygen and the other with nitrogen. Depending on the time he wants to stay under water and the depth of diving the scuba diver needs various amount of ..

  Design an adt for a two-color

Design an ADT for a two-color, double-stack ADT that consists of two stacks one "red" and one "blue" and has as its operations color-coded versions of the regular stack ADT operations.

  Write a program in java that simulates a simple line editor

Write a program in Java that simulates a simple line editor which supports the following operations

  Class named stock to model a stock

Write a class named Stock to model a stock. The properties and methods of the class are shown in Figure 6.22. The metho changePercent computes the percentage of the change in the current vs. the previous closing price.

  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..

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Simple java application that uses the string

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Implement/update specific methods for the dfs of a graph

implement/update specific methods for the DFS of a graph; for at least 2 graphs (1 being the provided one), show the DFS order of vertices in the graph, and for each node,

  Write a code fragment that would printout the multiplication

Write a code fragment that would printout the multiplication table for the number 3 multiplied by (1-10) .

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