public class RochambeauPlayer
extends java.lang.Object
Constructor and Description |
---|
RochambeauPlayer(java.lang.String name)
Constructor for RochambeauPlayer objects.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Query method to get the player's name.
|
int |
getWins()
Query method to get the player's win total.
|
void |
incrementWins()
Increment the number of wins of the player
|
java.lang.String |
lastThrow()
Query method to get the last throw in String format.
|
int |
makeThrow()
Player decides randomly which throw to make.
|
int |
makeThrow(int throwType)
Instruct the player which throw to make.
|
java.lang.String |
toString()
Query method to get player as a String.
|
public RochambeauPlayer(java.lang.String name)
name
- the name of the playerpublic java.lang.String getName()
public int getWins()
public java.lang.String lastThrow()
public java.lang.String toString()
toString
in class java.lang.Object
public void incrementWins()
public int makeThrow()
public int makeThrow(int throwType)
throwType
- the throw to make