Documentation
¶
Index ¶
Constants ¶
View Source
const NormalThrowCount = 20
NormalThrowCount is the number of throws in a game not counting bonus throws
View Source
const StrikeScore = 10
StrikeScore is the number of points a strike is worth
Variables ¶
This section is empty.
Functions ¶
func ScoreGame ¶
ScoreGame calculates the final score of a bowling game. The game is passed in as a string of frames each separated by a '-' (without quotation marks). Strikes are represented with an 'X', spares are represented with a '/', and an open frame is two digits representing the number of pins knocked down by the two throws in that frame.
This function assumes that the game string passed in is a valid game.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.