2022-12-09 01:38:11 +01:00
|
|
|
import domain.C3PO;
|
2022-12-14 09:54:18 +01:00
|
|
|
import domain.R2D2;
|
|
|
|
import robot.exceptions.RobotException;
|
2022-12-09 01:38:11 +01:00
|
|
|
|
2022-12-08 14:46:33 +01:00
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
2022-12-09 10:45:51 +01:00
|
|
|
|
|
|
|
C3PO Herbert = new C3PO(0, "Herbert");
|
2022-12-14 09:54:18 +01:00
|
|
|
R2D2 Gudrun = new R2D2(0, "Gdurun");
|
2022-12-09 10:45:51 +01:00
|
|
|
int[] input = {6,5,4,3,2,1};
|
2022-12-14 09:54:18 +01:00
|
|
|
int[] input2 = input;
|
|
|
|
//Herbert.triggerPowerSwitch();
|
|
|
|
//Gudrun.triggerPowerSwitch();
|
2022-12-09 10:45:51 +01:00
|
|
|
|
2022-12-14 09:54:18 +01:00
|
|
|
try{
|
|
|
|
Herbert.speak(input);
|
|
|
|
}catch(RobotException re){
|
|
|
|
System.out.println(re);
|
|
|
|
}
|
|
|
|
|
|
|
|
try{
|
|
|
|
Gudrun.think(input2);
|
|
|
|
}catch(RobotException re){
|
|
|
|
System.out.println(re);
|
|
|
|
}
|
|
|
|
//System.out.println("Was neues ausgeben");
|
2022-12-09 10:45:51 +01:00
|
|
|
|
2022-12-09 01:38:11 +01:00
|
|
|
//just some testing
|
|
|
|
/*C3PO Herbert = new C3PO(0, "Herbert");
|
|
|
|
int[] input = {6,5,4,3,2,1};
|
|
|
|
Herbert.triggerPowerSwitch();
|
|
|
|
try{
|
|
|
|
String asString = Herbert.speak(input);
|
|
|
|
System.out.println(asString);
|
|
|
|
}catch(RobotException re){
|
|
|
|
System.out.println(re);
|
|
|
|
}
|
2022-12-08 14:46:33 +01:00
|
|
|
|
2022-12-09 01:38:11 +01:00
|
|
|
*/
|
2022-12-08 14:46:33 +01:00
|
|
|
}
|
|
|
|
}
|