ocaml: phase 5.1 bowling.ml baseline (10-pin bowling score, sample game = 167)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Walks the pin-knockdown list applying strike/spare bonuses through
a 10-frame counter:
strike (10): score 10 + next 2 throws, advance i+1
spare (a + b = 10): score 10 + next 1 throw, advance i+2
open (a + b < 10): score a + b, advance i+2
Frame ten special-cases are handled implicitly: the input includes
bonus throws naturally and the while-loop terminates after frame 10.
bowling_score [10; 7; 3; 9; 0; 10; 0; 8; 8; 2; 0; 6;
10; 10; 10; 8; 1]
= 20+19+9+18+8+10+6+30+28+19
= 167
131 baseline programs total.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"anagrams.ml": 3,
|
||||
"atm.ml": 120,
|
||||
"bag.ml": 3,
|
||||
"bowling.ml": 167,
|
||||
"bf_full.ml": 6,
|
||||
"bisect.ml": 141,
|
||||
"bigint_add.ml": 28,
|
||||
|
||||
Reference in New Issue
Block a user