diff --git a/cicaprojekt/Menu.java b/cicaprojekt/Menu.java index 76fbcdb..fb25df1 100644 --- a/cicaprojekt/Menu.java +++ b/cicaprojekt/Menu.java @@ -1,65 +1,8 @@ package cicaprojekt; -import java.io.BufferedReader; -import java.io.Console; -import java.io.IOException; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; - public class Menu { - public static void main(String[] args) throws IOException, InvocationTargetException, IllegalAccessException { + public static void main(String[] args) { System.out.println("Continuously Integrated Cica Projekt - Proto"); System.out.println("Üdvözöllek a Babylon Simulator 2000 játékban! Kérlek válassz egy menüpontot!"); - - Tester tester = new Tester(); - - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - - boolean isExiting = false; - while (!isExiting) { - try { - String[] input = br.readLine().split(" "); - switch (input[0]) { - case "loadMap": - tester.loadMap(input[1]); - break; - case "listPlayers": - System.out.println(tester.listPlayers()); - break; - case "move": - tester.move(input[1]); - break; - case "boxLift": - System.out.println(tester.boxLift(input[1])); - break; - case "boxDrop": - System.out.println(tester.boxDrop(input[1])); - break; - case "shootONeillsGun": - tester.shootONeillsGun(input[1]); - break; - case "rotate": - tester.rotate(input[1], input[2]); - break; - case "listStargates": - System.out.println(tester.listStargates()); - break; - case "runAllTests": - boolean testresult = tester.runAllTests(); - if (testresult) - System.out.println("All tests successful!"); - else - System.out.println("Tests failed!"); - break; - case "exit": - isExiting = true; - break; - } - } catch (Exception e) { - e.printStackTrace(); - //TODO not so granular error handling - } - - } } }