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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. 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!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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