ItMayBeAHack OOD Exercises
An exercise in OOD as guided by ItMayBeAHack.com.
Public Member Functions | Static Public Member Functions | Properties | List of all members
Roulette.Outcome Class Reference

Responsible for representing the various Outcomes for the Roulette game. Each Outcome is comparable by its name. More...

Public Member Functions

 Outcome (string name, ushort odds)
 Constructions a new outcome. More...
 
int GetWinAmount (ushort amount)
 Returns the payout amount based on the odds. More...
 
override int GetHashCode ()
 
override bool Equals (object obj)
 
override string ToString ()
 
Returns
User friendly string representation of this object.
More...
 

Static Public Member Functions

static bool operator== (Outcome a, Outcome b)
 
static bool operator!= (Outcome a, Outcome b)
 

Properties

string name [get]
 
ushort odds [get]
 

Detailed Description

Responsible for representing the various Outcomes for the Roulette game. Each Outcome is comparable by its name.

Constructor & Destructor Documentation

Roulette.Outcome.Outcome ( string  name,
ushort  odds 
)

Constructions a new outcome.

Parameters
nameUnique name.
oddsThe payout odds.

Member Function Documentation

override bool Roulette.Outcome.Equals ( object  obj)
override int Roulette.Outcome.GetHashCode ( )
int Roulette.Outcome.GetWinAmount ( ushort  amount)

Returns the payout amount based on the odds.

Parameters
amountThe amount of the bet.
Returns
The payout amount.
static bool Roulette.Outcome.operator!= ( Outcome  a,
Outcome  b 
)
static
static bool Roulette.Outcome.operator== ( Outcome  a,
Outcome  b 
)
static
override string Roulette.Outcome.ToString ( )

Returns
User friendly string representation of this object.

Property Documentation

string Roulette.Outcome.name
get
ushort Roulette.Outcome.odds
get

The documentation for this class was generated from the following file: