day51

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shuffle

func Shuffle(cards []Card, k int)

Shuffle randomly shuffles the cards using a random function that returns values between 1 and k inclusive.

Types

type Card

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

Card represents a playing card with a Suit and Rank.

func NewDeck

func NewDeck() []Card

NewDeck returns a deterministic deck of cards.

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