Rewrite for dice roll codes.