2022-12-26 17:06:42 +01:00
|
|
|
import de.hsmannheim.informatik.name.domain.RobotFactory;
|
|
|
|
import de.hsmannheim.informatik.name.domain.RobotType;
|
|
|
|
import de.hsmannheim.informatik.name.domain.exceptions.RobotIllegalStateException;
|
|
|
|
import java.util.Random;
|
|
|
|
|
2022-12-20 10:32:34 +01:00
|
|
|
public class Main {
|
2022-12-26 17:06:42 +01:00
|
|
|
public static void main(String[] args) throws RobotIllegalStateException {
|
|
|
|
Random r = new Random();
|
|
|
|
RobotFactory rf = new RobotFactory();
|
|
|
|
RobotType R2D2 = RobotType.R2D2;
|
|
|
|
RobotType C3P0 = RobotType.C3P0;
|
|
|
|
for (int i = 0; i < 10000; i++) {
|
|
|
|
rf.getRobot(R2D2, 0);
|
|
|
|
}
|
|
|
|
System.out.println("finished R2D2");
|
|
|
|
for (int i = 0; i < 10000; i++) {
|
|
|
|
rf.getRobot(C3P0, 0);
|
|
|
|
}
|
|
|
|
System.out.println("finished C3P0");
|
2022-12-20 10:32:34 +01:00
|
|
|
}
|
|
|
|
}
|