Fixed Menu

This commit is contained in:
Bokros Bálint 2016-04-26 00:34:46 +02:00
parent 7c7c1ce9f9
commit 9436508c60

View File

@ -1,6 +1,8 @@
package cicaprojekt;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Menu {
public static void main(String[] args) throws IOException {
@ -9,8 +11,11 @@ public class Menu {
Tester tester = new Tester();
String in = System.console().readLine();
String[] input = in.split(" ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
boolean isExiting = false;
while(!isExiting) {
String[] input = br.readLine().split(" ");
switch (input[0]) {
case "loadMap":
tester.loadMap(input[1]);
@ -36,6 +41,10 @@ public class Menu {
case "listStargates":
tester.listStargates();
break;
case "exit":
isExiting = true;
break;
}
}