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

  Values that occur just once

This list has some values that occur just once (1, 3, 4, 11, 13, 18), some values that occur twice (9, 16), some values that occur three times (14, 19) and a single value that occurs four times (7). Therefore, the call of list.maxCount() should re..

  Create a recursive factorial program

Assignment 1: Create a recursive factorial program that prompts the user for an integer  N  and writes out a series of equations representing the calculation of  N !. For example, if the input is 4, the output could be:

  Accepts a scanner representing an input file

Write a method in JAVA called stripHtmlTags that accepts a Scanner representing an input file containing an HTML web page as its parameter, then reads that file and prints the file's text with all HTML tags removed. A tag is any text between the c..

  Write a class array that encapsulates an array

Write a class Array that encapsulates an array and provides bounds-checked access. The private instance variables should be int index and inarray[10]. The public members should be a default constructor and methods (signatures shown below) to provide ..

  Write a class to represent a credit card.

write a class to represent a credit card.

  Java program for real estate agent

Write down java program for real estate agent. Program must perform the following tasks: ask users for average house price for the each of past 5 years for single family residence of 1500 square feet.

  Write java program to find calories-conditional operator

Write down the answer for this program? Write down Java program (use Conditional (? Operator) which suggests number of calories a person must eat each day.

  Implement simple java program to input syllabus grades

To implement simple Java program to input (hypothetical) syllabus grades, computing and displaying both normal Mean and Harmonic Mean.

  Write a recursive program

Write a recursive program to compute the number of ways in which an integer k can be written as sum

  Create a java class called samearraysexception

Create a Java class called SameArraysException that extends the Exception class.

  Populate a one-dimensional array

Populate a one-dimensional array with the following grades in this order: 93, 61, 72, 45, 84, 51, 70, 83, 96, and 66. Use a loop to call a method from main() that adds

  Develop java package comprising of class using encapsulation

Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.

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