Skip to content

Instantly share code, notes, and snippets.

View ronhopper's full-sized avatar

Ron Hopper ronhopper

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ronhopper on github.
  • I am ronhopper (https://keybase.io/ronhopper) on keybase.
  • I have a public key whose fingerprint is 0A64 648A F4D8 72A1 DBB3 10A8 592E D345 21F0 F9AE

To claim this, I am signing this object:

@ronhopper
ronhopper / bowling_scorer.rb
Created March 26, 2009 10:29
A simple bowling scorer that came to me in a dream.
class BowlingScorer
def initialize(rolls)
@rolls = rolls
end
def score
total = 0
rolls_left = @rolls.dup
10.times { total += score_frame(rolls_left) }