changes generation of random ID

main
Luc Dreibholz 2023-01-10 12:35:51 +01:00
parent 74c088e4fb
commit 604def2e2c
1 changed files with 1 additions and 2 deletions

View File

@ -49,8 +49,7 @@ public class RobotFactory {
case R2D2 -> {
int serialNumberR2D2;
do {
String temp = String.format("%05d", r.nextInt(10000));
serialNumberR2D2 = Integer.parseInt(temp);
serialNumberR2D2 = r.nextInt(10000);
if (serialNumbersR2D2.size() == 10000) {
return null;
}