java.lang.ObjectRouletteWheel
public class RouletteWheel
Class that models an American-style roulette wheel (with numbers 1-36, 0, and 00).
| Constructor Summary | |
|---|---|
RouletteWheel()
Constructor for objects of class RouletteWheel |
|
| Method Summary | |
|---|---|
java.lang.String |
getColor(java.lang.String slotValue)
Determines the color for a particular number on the wheel. |
int |
getNumberOfSpins()
Reports the number of times the wheel has been spun. |
java.lang.String |
getParity(java.lang.String slotValue)
Determines the parity for a particular number on the wheel. |
java.lang.String |
spin()
Simulates a single spin of the roulette wheel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RouletteWheel()
| Method Detail |
|---|
public java.lang.String getColor(java.lang.String slotValue)
slotValue - the slot value on the wheel (e.g., "12" or "00")
public int getNumberOfSpins()
public java.lang.String getParity(java.lang.String slotValue)
slotValue - the slot value on the wheel (e.g., "12" or "00")
public java.lang.String spin()