Skip to content

Latest commit

 

History

History
38 lines (22 loc) · 842 Bytes

File metadata and controls

38 lines (22 loc) · 842 Bytes

Bowling scoring calculator


Assumptions

  • Each bowling game has 10 frames, with the last frame being a bonus frame consisting of up to 3 bowls

  • When calculating the score, only frames that have been completed will be evaluated for the total score for a player so far

  • The scoreboard can be printed onto the screen at any time, even before the game has ended

  • The solution was designed for use as a CLI which receives arguments

Architectures

alt text


Bonus

Represents possible extra frame composed by one or two tries if bowler score a spare or strik respectively in his last normal try.

Testing

  rspec specs/

Usage

Check data's folder to see valid values accepted. i.e

  ruby scoring.rb --pattern XXXXXXXXXXXX