diff --git a/src/fr/devinsy/catgenerator/core/CatGenerator.java b/src/fr/devinsy/catgenerator/core/CatGenerator.java index 2cef020..767cf6b 100644 --- a/src/fr/devinsy/catgenerator/core/CatGenerator.java +++ b/src/fr/devinsy/catgenerator/core/CatGenerator.java @@ -100,9 +100,6 @@ public class CatGenerator } else { - // Initialize the random generator. - Random generator = new Random(Integer.parseInt(DigestUtils.md5Hex(seed).substring(0, 6), 16)); - // Create an empty image. result = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB); Graphics2D grapher = result.createGraphics(); @@ -110,6 +107,8 @@ public class CatGenerator grapher.clearRect(0, 0, 256, 256); // Add stuff. + // Initialize the random generator. + Random generator = new Random(Integer.parseInt(DigestUtils.md5Hex(seed).substring(0, 6), 16)); drawImage(grapher, "body", generator.nextInt(15) + 1); drawImage(grapher, "fur", generator.nextInt(10) + 1); drawImage(grapher, "eyes", generator.nextInt(15) + 1);