I am programming a simple C# console application.
The spec is:
A game consists of ten frames, which start with a full rack of ten pins. In each frame, you have two deliveries of your ball, in which to knock down as many of the ten pins as you can. If you knock down all the pins on your first ball, it is called a strike. The score doesn't get added on straight away because for a strike you get the values of your next two balls as a bonus. For example, if you score a strike in the first frame, then a 7 and 1 in the second frame, you would score 18 (10+7+1) for the first frame, and 8 for the second frame, making a total of 26 after two frames. If you knock down some of the pins on the first ball, and knock down the remainder of the pins in the second ball, it is known as a spare. Again, the score doesn't get added on straight away because for a spare, you get the values of your next ball as a bonus. For example, if you score a spare in the first frame, say a 6 and a 4, then got an 8 and a 1 in the second frame, you would score 18 (6+4+8) for the first frame, and 9 for the second frame, making a total of 27 after two frames.
I understand how to write the code etc. etc. However, I just cannot get my head around the best way of doing this scoring system and I need some advice. Obviously a new object will be created for each player, however I am not sure of how to get round what seemed like a simple programming problem initially.
Any help would be greatly appreciated.
Regards