Skip to content

cklone/blackjack-ruby

Repository files navigation

This directory contains ruby programs and classes for BlackJack.
I kept everything in one directory to make things easy to begin with.
Look in the doc folder for the RDoc generated HTML for this project.

PROGRAMS (assume ruby's in /usr/bin/ruby)
--------
bj.rb: play BlackJack
bj.rb --help: get Usage information
ts_bj.rb: run the test suite (this runs all the test cases)
tc_*.rb run an individual test case

This project was based on the following specs from jeremy at rapleaf dot com:

Implement a simple game of blackjack. It may use a simple, command-line interface. The program should start by asking how many players are at the table, start each player with $1000, and allow the players to make any integer bet for each deal.

The program must implement the core blackjack rules, i.e. players can choose to hit until they go over 21, the dealer must hit on 16 and stay on 17, etc. It must also support more complex rules such as doubling-down and splitting.

You are more than welcome to add any sort of functionality you like on top of these basics. We are most interested in seeing a clean codebase that we can readily understand.

email coder at cklone dot com for any questions.

About

A command-line blackjack game in ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages