Skip to content

myxaluch/bj_ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CatBlackJack - BlackJack in Ruby (with Sinatra)


This is an implementation of Blackjack in Ruby with the following house rules:

  • Blackjack wins 3:2
  • Dealer stands at 17
  • Double-down only on first two cards
  • Double-down limited to 100% of bet

Running game

  • Clone this repo
  • Run bundle
    $> cd bj-ruby
    bj-ruby> bundle install
  • To run the game
    bj-ruby> ruby start.rb

Running test

  • To run the test
    bj-ruby> ruby start_test.rb

Specification

Implement a simple game of Blackjack. It used a web-interface (via Sinatra). Player start game with $1000, and allow to make bet with 50$-step for each deal.

The program 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 and also support doubling-down.

The UI(css) partly taken from this repo: https://github.com/tonyspiro/blackjack (thanks for tonyspiro)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published