The document describes requirements for a bowling score calculator program. It must calculate scores for:
1) A "gutter game" with all rolls of 0 scoring 0 total
2) All rolls of 1 scoring a total of 20
3) A game without spares scoring a total of 15
It also provides variants for different planets with modified rules, such as more frames or increasing pin counts. The program must support these variants in any combination.
1. the bowling game kata
Using the OCP rules, write a calculator for scores in ten-pin bowling:
@Test
public void gutterGame() throws Exception {
BowlingGame game = new BowlingGameFactory().create();
for (int i=0; i<20; i++) {
game.roll(0);
}
assertEquals(0, game.score());
}
3. Bonus variants
And here are some bonus variants:
In Martian bowling there are 12 frames, with 3 rolls per frame.
All other rules are unchanged.
In the Callisto variant, the rules are as for normal (Earth) bowling,
except as long as the last roll is a 10 you may keep on rolling.
The Callisto variant may be played with Martian rules
In Venusian rules the number of pins starts at 1 for the first frame,
and increases by 1 for each subsequent frame.
All other rules as per Earth bowling.
The Venusian rules may be applied to all other variants
… in any combination.