Hello,
Im thinking how to solve this one :
https://github.com/exercism/problem-specifications/blob/master/exercises/bowling/description.md
so I thought because you throw two times for a frame to solve it like
this :
aCollection withIndexDo: [:index :item |
(if spare) ifTrue: take 3 items out of the score collection and sum
them up
(if strike) ifTrue: take 4 items out of the score collection and sum
them up.
(if not a spare and not a strike) : ifTrue: take 2 items out of the
score collection and sum them up.
index := index + 2 // because a frame is always two times a throw
Now I wonder if this is a valid smalltalk to do this
Roelof