Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 543 Bytes

Scoring rules:

  • The person(s) closest to 21 points without going over wins.
  • Number cards are their value (1 =1, 2 = 2, etc)
  • King, Queen, and Jack cards are 10
  • Ace can be counted as 1 or 11 (player’s choice).
  • If someone scores over 21 they are disqualified.
  • Anyone using over 5 cards is disqualified.

Some example hands:

A, J => 21
A, 10, A => 12
8, A, A => 20
5, 3, 7 => 15
K, Q, J => went over 21!

Inspired by:

  • colinfmurphy.com/blackjack-code-kata/
  • beatblackjack.org/en/rules/
  • codewars.com/kata/blackjack-scorer