Skip to content

hughgrigg/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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