Blackjack game for the command line
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cards
game
ui
util
.gitignore
.travis.yml
LICENSE
README.md
main.go
screenshot.png

README.md

Blackjack

Build Status Go Report Card Coverage Status

This is an implementation of the blackjack casino game in Go. This game is also known as twenty-one.

The game uses a single 52-card deck.

Blackjack screenshot

Playing

If you have Go installed then you should be able to play the game with:

go get -u github.com/hughgrigg/blackjack
blackjack

Tests

You can run all the tests with:

go get github.com/stretchr/testify/assert
go test -v ./...

Or for nicer output:

go get -u github.com/kyoh86/richgo
richgo test -v ./...

For code coverage:

go get golang.org/x/tools/cmd/cover
for p in cards game ui util; do go test -coverprofile cover.out ./${p}; done