Class HoldAt20PigPlayer java.lang.Object HoldAt20PigPlayer All Implemented Interfaces:PigPlayerpublic class HoldAt20PigPlayerextends java.lang.Objectimplements PigPlayer HoldAt20PigPlayer - a Pig player that rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL_SCORE.       Constructor Summary HoldAt20PigPlayer()               Method Summary  boolean isRolling(int myScore, int otherScore, int turnTotal)           isRolling - return whether or not the player rolls, given the current game state.   Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait     Constructor Detail HoldAt20PigPlayer public HoldAt20PigPlayer() Method Detail isRolling public boolean isRolling(int myScore, int otherScore, int turnTotal)isRolling - return whether or not the player rolls, given the current game state. The hold-at-20-or-goal player rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL_SCORE.   Specified by:isRolling in interface PigPlayerParameters:myScore - an int value - the player's scoreotherScore - an int value - the opponent's scoreturnTotal - an int value - the player's current turn totalReturns:a boolean value - whether or not the player will continue to roll

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Class HoldAt20PigPlayer

java.lang.Object HoldAt20PigPlayer All Implemented Interfaces:PigPlayerpublic class HoldAt20PigPlayerextends java.lang.Objectimplements PigPlayer

HoldAt20PigPlayer - a Pig player that rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL_SCORE.

 

 

 

Constructor Summary
HoldAt20PigPlayer()
           

 

Method Summary
 boolean isRolling(int myScore, int otherScore, int turnTotal)
          isRolling - return whether or not the player rolls, given the current game state.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

Constructor Detail

HoldAt20PigPlayer

public HoldAt20PigPlayer()

Method Detail

isRolling

public boolean isRolling(int myScore, int otherScore, int turnTotal)isRolling - return whether or not the player rolls, given the current game state. The hold-at-20-or-goal player rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL_SCORE.

 

Specified by:isRolling in interface PigPlayerParameters:myScore - an int value - the player's scoreotherScore - an int value - the opponent's scoreturnTotal - an int value - the player's current turn totalReturns:a boolean value - whether or not the player will continue to roll

Free Programming Project 4
O HoldAt20PigPlayer (0-0 Pig)
+
A Not Secure nifty.stanford.edu/2010/neller-pig/doc/index.html
All Classes
Die
HoldAt20PigPlayer
OOPig
PigGame
PigPlayer
UserPigPlayer
Class HoldAt20PigPlayer
java.lang.object
LHoldAt 20PigPlayer
All Implemented Interfaces:
PigPlayer
public class HoldAt20PigPlayer
extends java.lang.Object
implements PigPlayer
HoldAt20PigPlayer - a Pig player that rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL SCORE.
Constructor Summary
HoldAt20PigPlayer()
Method
Summary
boolean isRolling (int myScore, int otherScore, int turnTotal)
isRolling - return whether or not the player rolls, given the current game state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getclass, hashCode, notify, notifyAll, tostring, wait, wait, wait
Constructor Detail
HoldAt20PigPlayer
public HoldAt20PigPlayer()
Method Detail
isRolling
public boolean isRolling (int myScore,
int otherScore,
int turnTotal)
isRolling - r
whether or not the player rolls, given the current game state. The hold-at-20-or-goal player rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL_SCORE.
Specified by:
isRolling in interface PigPlayer
Parameters:
myScore - an int value - the player's score
otherScore - an int value - the opponent's score
turnTotal - an int value - the player's current turn total
Returns:
a boolean value - whether or not the player will continue to roll
Rookage Cleee Tree Depreented Index Heln
Transcribed Image Text:Free Programming Project 4 O HoldAt20PigPlayer (0-0 Pig) + A Not Secure nifty.stanford.edu/2010/neller-pig/doc/index.html All Classes Die HoldAt20PigPlayer OOPig PigGame PigPlayer UserPigPlayer Class HoldAt20PigPlayer java.lang.object LHoldAt 20PigPlayer All Implemented Interfaces: PigPlayer public class HoldAt20PigPlayer extends java.lang.Object implements PigPlayer HoldAt20PigPlayer - a Pig player that rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL SCORE. Constructor Summary HoldAt20PigPlayer() Method Summary boolean isRolling (int myScore, int otherScore, int turnTotal) isRolling - return whether or not the player rolls, given the current game state. Methods inherited from class java.lang.Object clone, equals, finalize, getclass, hashCode, notify, notifyAll, tostring, wait, wait, wait Constructor Detail HoldAt20PigPlayer public HoldAt20PigPlayer() Method Detail isRolling public boolean isRolling (int myScore, int otherScore, int turnTotal) isRolling - r whether or not the player rolls, given the current game state. The hold-at-20-or-goal player rolls as long as the turn total is less than 20 and the player's score plus the turn total is less than the goal score PigGame.GOAL_SCORE. Specified by: isRolling in interface PigPlayer Parameters: myScore - an int value - the player's score otherScore - an int value - the opponent's score turnTotal - an int value - the player's current turn total Returns: a boolean value - whether or not the player will continue to roll Rookage Cleee Tree Depreented Index Heln
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education