diff --git a/src/de/hsmannheim/informatik/name/domain/RobotFactory.java b/src/de/hsmannheim/informatik/name/domain/RobotFactory.java index b163968..cb50e68 100644 --- a/src/de/hsmannheim/informatik/name/domain/RobotFactory.java +++ b/src/de/hsmannheim/informatik/name/domain/RobotFactory.java @@ -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; }