Implémentation de la méthode getRandomBetween()

This commit is contained in:
Vincent Guillet
2025-04-28 17:51:53 +02:00
parent 3e424a708e
commit 3c2dc776a8

View File

@@ -7,4 +7,7 @@ public class JeuDevinette {
private int[] tentatives; private int[] tentatives;
private final int MAX_TENTATIVES = 10; private final int MAX_TENTATIVES = 10;
private int getRandomBetween(int min, int max) {
return (int)(Math.random() * (max - min + 1)) + min;
}
} }