Responsible for:
More...
Responsible for:
- Constructing and maintaining a list of bins (numbers that the wheel can land on) and their outcomes.
- Supplying a random bin to simulate a wheel spin.
- Maintiains a unique list of outcomes available for this wheel.
| Roulette.Wheel.Wheel |
( |
IBinBuilder |
binBuilder = null, |
|
|
int |
binSize = 38, |
|
|
int |
rngSeed = int.MinValue |
|
) |
| |
Constructs a new wheel, sets its random number generator, and has bin builder fill this wheel's bins.
- Parameters
-
| binBuilder | Should only be null for testing. The BinBuilder that will fill the wheel's bins. |
| binSize | Optional, default is 38 bins. |
| rngSeed | Should only be set when testing. |
| void Roulette.Wheel.AddOutcomeToBin |
( |
int |
index, |
|
|
Outcome |
outcome |
|
) |
| |
Adds an outcome to the 'bins' array at the specified index.
- Parameters
-
| index | Index to set the outcome at. |
| outcome | The outcome to set. |
| Bin Roulette.Wheel.GetBinAtIndex |
( |
int |
index | ) |
|
Returns a Bin at a specific index. For testing purposes.
- Parameters
-
| index | The index of the bin to retrieve. |
- Returns
- A Bin from the 'bin' array.
| int Roulette.Wheel.GetBinSize |
( |
| ) |
|
Gets the size of the bins array.
- Returns
- Size of the bins array.
| Outcome Roulette.Wheel.GetOutcome |
( |
string |
name | ) |
|
Retrieves outcome from the outcome dictionary by name.
- Parameters
-
- Returns
- An outcome if found otherwise null.
| Bin Roulette.Wheel.GetRandomBin |
( |
| ) |
|
Gets a random bin from the bins array based on the random number generator.
- Returns
- A random bin.
The documentation for this class was generated from the following file:
- E:/@Documents/My Open Source Repos/ItMayBeAHackOOD/Assets/01_Roulette/Wheel.cs