java.lang.ObjectRouletteGame
public class RouletteGame
Class that simulates betting on a roulette wheel.
| Constructor Summary | |
|---|---|
RouletteGame()
Constructor of objects of class RouletteGame. |
|
| Method Summary | |
|---|---|
void |
addCredits(int numCredits)
Adds a number of credits to the player's account (assuming the number is positive). |
int |
checkCredits()
Determines the current number of credits in the player's account. |
java.lang.String |
makeBet(int betAmount,
int number)
Makes a bet on a specific number and simulates the spin. |
java.lang.String |
makeBet(int betAmount,
java.lang.String color)
Makes a bet on a color and simulates the spin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RouletteGame()
| Method Detail |
|---|
public void addCredits(int numCredits)
numCredits - the number of credits to addpublic int checkCredits()
public java.lang.String makeBet(int betAmount,
int number)
betAmount - the number of credits being betnumber - the wheel number being bet upon (1-36)
public java.lang.String makeBet(int betAmount,
java.lang.String color)
betAmount - the number of credits being betcolor - the color being bet upon ("red" or "black")