Created
November 4, 2010 17:48
-
-
Save abyx/662853 to your computer and use it in GitHub Desktop.
Bowling snippet with duplication?
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
if rolls[frameIndex] == 10: | |
score += rolls[frameIndex] + rolls[frameIndex + 1] + rolls[frameIndex + 2] | |
frameIndex++ | |
elif rolls[frameIndex] + rolls[frameIndex + 1] == 10: | |
score += rolls[frameIndex] + rolls[frameIndex + 1] + rolls[frameIndex + 2] | |
frameIndex += 2 | |
else: | |
score += rolls[frameIndex] + rolls[frameIndex + 1] | |
frameIndex += 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment