C# Class Blackjack.BlackjackGame

BlackjackGame class represents the BlackJack card game entity
Inheritance: ICardGame
Show file Open project: tansey/blackjack Class Usage Examples

Public Methods

Method Description
BlackjackGame ( BlackjackSettings settings ) : System

Creates a new instance of a game of Blackjack.

CanDoubleDown ( PlayerHand hand ) : bool
CanHit ( PlayerHand hand ) : bool
CanSplit ( PlayerHand hand ) : bool
CanSurrender ( PlayerHand hand ) : bool
DealerMustHit ( DealerHand hand ) : bool
Play ( IEnumerable players ) : void

Plays a game of Blackjack with the collection of players.

Private Methods

Method Description
LogError ( HandInfo info ) : void

Method Details

BlackjackGame() public method

Creates a new instance of a game of Blackjack.
public BlackjackGame ( BlackjackSettings settings ) : System
settings BlackjackSettings
return System

CanDoubleDown() public method

public CanDoubleDown ( PlayerHand hand ) : bool
hand PlayerHand
return bool

CanHit() public method

public CanHit ( PlayerHand hand ) : bool
hand PlayerHand
return bool

CanSplit() public method

public CanSplit ( PlayerHand hand ) : bool
hand PlayerHand
return bool

CanSurrender() public method

public CanSurrender ( PlayerHand hand ) : bool
hand PlayerHand
return bool

DealerMustHit() public method

public DealerMustHit ( DealerHand hand ) : bool
hand DealerHand
return bool

Play() public method

Plays a game of Blackjack with the collection of players.
public Play ( IEnumerable players ) : void
players IEnumerable
return void