The Bowling Game Kata
- Gutter game scores zero – When you roll all misses, you get a total
score of zero. - All ones scores 20 – When you knock down one pin with each ball, your
total score is 20. - A spare in the first frame, followed by three pins, followed by
all misses scores 16. - A strike in the first frame, followed by three and then four pins,
followed by all misses, scores 24. - A perfect game (12 strikes) scores 300.
The String Calculator Kata
- An empty string returns zero
- A single number returns the value
- Two numbers, comma delimited, returns the sum
- Two numbers, newline delimited, returns the sum
- Three numbers, delimited either way, returns the sum
- Negative numbers throw an exception
- Numbers greater than 1000 are ignored
- A single char delimiter can be defined on the first line (e.g.
//#
for a
‘#’ as the delimiter) - A multi char delimiter can be defined on the first line (e.g.
//[###]
for
‘###’ as the delimiter) - Many single or multi-char delimiters can be defined (each wrapped in square
brackets)
The Fizz Buzz Kata
- Any number divisible by three is replaced by the word fizz
- Any number divisible by five is replaced by the word buzz
- Numbers divisible by both three and five become fizzbuzz
See also:
http://codekata.pragprog.com
http://codingdojo.org
amirrajan.net