A game comprises ten frames.
Each frame comprises up to 2 rolls.
One point is scored for each pin that is knocked down.
If all 10 pins are knocked down on the first shot then the frame ends, you get a strike, and earn 10 points plus the sum of the next two shots.
If all 10 pins are knocked down using both shots then you get a spare and earn 10 points plus the sum of the next shot.
The rules are different for the 10th frame.
If you roll a strike with the first shot on the first shot of the 10th frame then you get 2 more shots.
If you roll a spare with the first two shots of the 10th frame then you get 1 more shot.
The score for the 10th frame is the total number of pins knocked down.
Keep track of the score during a bowling game.