Completed challenge 23, with a minor addition to c21 to allow setting the RNG state.