http://www.perlmonks.org?node_id=103138


in reply to Re: (Golf) Let's go bowling
in thread (Golf) Let's go bowling

One reason you're getting a higher score is because you aren't dealing with spares correctly. Look at the score after the first frame, it's 21 which is impossible for a spare frame. When a frame is a spare, you count the first ball twice because the ten pins that you assign a '/' includes the pins knocked down with the first ball which you already counted (i.e. I knock down 5 pins then another 5 pins for a spare -- you count 5 pins and another 10 pins for the spare which is wrong).