Pig Game class plz HELP!!!
Hi, we are suppose to create a class for the game pig in our Java class having 3 methods: compScore, playerScore, and play. Can somebody please give me an example on what do i need to have in each method. Or show me how to make the class. :confused:
// Pig game rules:
On each turn, the player rolls a pair of ice and adds up his or her points. Whoever reaches 100 points first, wins. if a player rolls 1, he or she looses all points for that round and the dice go to the other player. If a player rolls two 1s in one turn, the player loses all points earned so far in the game and loses control of dice. The player may voluntarily turn over the dice after each roll. So the player must decide to eather roll again (be a pig) and risk loosing points, or give up the dice, possibly letting the other player win. Set up a computer player so that it always gives up the dice after 20 or more points earned.