day238

package
v0.0.0-...-36687a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MostPlayerWins

func MostPlayerWins(deck []Card) int

MostPlayerWins returns the most number of possible player wins. Dealer gets the first 2 cards of each hand. Player gets second 2 cards. Player tries every game based on drawing cards up until bust. Dealer draws until greater than or equal to 17 and stops.

Types

type Card

type Card struct {
	// contains filtered or unexported fields
}

Card represents a playing card with a Suit and Rank.

type Rank

type Rank string

Rank represents the face of the card.

type Suit

type Suit string

Suit represents the 4 suits: Hearts, Spades, Diamonds and Clubs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL