This Refactoring Kata was designed by Jon Jagger and is available in his Cyber-Dojo. See his blog post
I have changed it a little, so that the rules more closely match the original game.
If you like this Kata, you may be interested in my books and website SammanCoaching.org
The problem that this code is designed to solve is explained here: Yatzy