Help for Calculating Bowling Score
I'm trying to write a code to calculate a bowling score. The in file will have just a line of characters (XXX9/90F99-) where X is a strike, / is a spare, F is a foul, and - is a gutter ball. What's the best way to go about getting analyzing each frame so that I can calculate the score for each frame. For instance, if you get a spare you get 10 pts plus however many points you score on the first ball of the next frame, and so on... a strike is 10 pts plus the next two balls of the next frame, etc. If anyone could just help nudge me in the right direction on some of the ways I could set up this problem let me know. I've considered functions for calculating the score, but there always seems to be something I'm missing.