blackjack

package module
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

Blackjack

GoDoc License

A console application which simulates a blackjack game.

Install

You can download application from the releases page.

Install directly from the terminal.

curl -L
https://github.com/rwx-yxu/blackjack/releases/latest/download/blackjack-linux-amd64
-o ~/.local/bin/blackjack
curl -L
https://github.com/rwx-yxu/blackjack/releases/latest/download/blackjack-darwin-amd64
-o ~/.local/bin/blackjack
curl -L
https://github.com/rwx-yxu/blackjack/releases/latest/download/blackjack-darwin-arm64
-o ~/.local/bin/blackjack
curl -L
https://github.com/rwx-yxu/blackjack/releases/latest/download/blackjack-windows-amd64
-o ~/.local/bin/blackjack

Or with go:

go install github.com/rwx-yxu/blackjack/cmd/blackjack@latest

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DealerPhase

func DealerPhase()

func DrawPhase

func DrawPhase(u *user.U, deck *Deck)

func EndPrompt added in v0.2.2

func EndPrompt(r io.Reader)

func PlayerBust

func PlayerBust(r io.Reader)

func PlayerPhase

func PlayerPhase(r io.Reader)

func Run

func Run(r io.Reader)

Types

type Deck

type Deck struct {
	Cards []card.C
}

func NewDeck

func NewDeck() *Deck

func (*Deck) AddCard

func (d *Deck) AddCard(c card.C)

func (*Deck) Draw

func (d *Deck) Draw() card.C

Directories

Path Synopsis
cmd
blackjack command

Jump to

Keyboard shortcuts

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