Last active
August 29, 2015 14:02
-
-
Save RonJeffries/aa000a376d18aefae27d to your computer and use it in GitHub Desktop.
Swift language bowling with Tuples. Interesting ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func score() -> Int { | |
var sum = 0 | |
var index = 0 | |
for frame in 1...10 { | |
var (score, step) = frameScore(index) | |
sum += score | |
index += step | |
} | |
return sum | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment