changes generation of random ID
parent
74c088e4fb
commit
604def2e2c
|
@ -49,8 +49,7 @@ public class RobotFactory {
|
||||||
case R2D2 -> {
|
case R2D2 -> {
|
||||||
int serialNumberR2D2;
|
int serialNumberR2D2;
|
||||||
do {
|
do {
|
||||||
String temp = String.format("%05d", r.nextInt(10000));
|
serialNumberR2D2 = r.nextInt(10000);
|
||||||
serialNumberR2D2 = Integer.parseInt(temp);
|
|
||||||
if (serialNumbersR2D2.size() == 10000) {
|
if (serialNumbersR2D2.size() == 10000) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue