Bekomme immer folgende Fehlermeldung beim Checkstyle:
.java:34:51: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
GameMaster.java:37:58: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
GameMaster.java:40:59: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
GameMaster.java:43:60: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
.java:34:51: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
GameMaster.java:37:58: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
GameMaster.java:40:59: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
GameMaster.java:43:60: Ein Block muss mindestens eine Anweisung enthalten. [EmptyBlock]
Java:
import java.util.Scanner;
/**
* Beispiel zur Benutzung von Kommandozeilen-Parametern.
*/
public class GameMaster {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter size of the map: ");
int size = sc.nextInt();
Wizard wiz = new Wizard(size);
String command = "";
do {
System.out.println("What do you want to do ?");
command = sc.nextLine();
if (command.equals("")) {
command = sc.nextLine();
}
String[] commandParts = command.split(" ");
String commandPart1 = commandParts[0];
String commandPart2;
switch (commandPart1) {
case "walk":
commandPart2 = commandParts[1];
if (commandPart2.equals("N")) {
} else if (commandPart2.equals("S")) {
} else if (commandPart2.equals("W")) {
} else if (commandPart2.equals("E")) {
}
break;
case "take":
break;
case "map":
break;
case "drop":
break;
case "inv":
break;
}
} while (command.equals("done"));
}
}
} else if (commandPart2.equals("E")) {