diff --git a/src/com/labrisca/catalan/io/UserInput.java b/src/com/labrisca/catalan/io/UserInput.java index ab760ad..e10a7f9 100644 --- a/src/com/labrisca/catalan/io/UserInput.java +++ b/src/com/labrisca/catalan/io/UserInput.java @@ -16,13 +16,13 @@ public static String askGameMode() { while (true) { System.out.print("> "); String input = SC.nextLine().trim().toLowerCase(); - if (input.equals("si")) { + if (input.equals("si") || input.equals("1")) { System.out.println("Mode hacker activat!"); System.out.print("Text" + Color.ANSI_PURPLE + " lila " + Color.ANSI_RESET); System.out.println("= text que no veuries ;)"); System.out.println(); return "hacker"; - } else if (input.equals("no")) { + } else if (input.equals("no") || input.equals("0")) { System.out.println("Mode normal activat!"); System.out.println(); return "default"; @@ -37,11 +37,11 @@ public static boolean askAIBot() { while (true) { System.out.print("> "); String input = SC.nextLine().trim().toLowerCase(); - if (input.equals("si")) { + if (input.equals("si") || input.equals("1")) { System.out.println("PerdrĂ s :P!"); System.out.println(); return true; - } else if (input.equals("no")) { + } else if (input.equals("no") || input.equals("0")) { System.out.println("Beep beep..."); System.out.println(); return false; @@ -56,8 +56,8 @@ public static boolean askPrintCardsInfo() { while (true) { System.out.print("> "); String input = SC.nextLine().trim().toLowerCase(); - if (input.equals("si")) return true; - else if (input.equals("no")) return false; + if (input.equals("si") || input.equals("1")) return true; + else if (input.equals("no") || input.equals("0")) return false; System.out.println("Introdueix \"si\" o \"no\"..."); } } diff --git a/src/com/labrisca/english/io/UserInput.java b/src/com/labrisca/english/io/UserInput.java index e4eca31..0ff31c2 100644 --- a/src/com/labrisca/english/io/UserInput.java +++ b/src/com/labrisca/english/io/UserInput.java @@ -16,13 +16,13 @@ public static String askGameMode() { while (true) { System.out.print("> "); String input = SC.nextLine().trim().toLowerCase(); - if (input.equals("yes")) { + if (input.equals("yes") || input.equals("1")) { System.out.println("Hacker mode on!"); System.out.print(Color.ANSI_PURPLE + "Purple " + Color.ANSI_RESET); System.out.println("text = text you wouldn't see ;)"); System.out.println(); return "hacker"; - } else if (input.equals("no")) { + } else if (input.equals("no") || input.equals("0")) { System.out.println("Default mode on!"); System.out.println(); return "default"; @@ -37,11 +37,11 @@ public static boolean askAIBot() { while (true) { System.out.print("> "); String input = SC.nextLine().trim().toLowerCase(); - if (input.equals("yes")) { + if (input.equals("yes") || input.equals("1")) { System.out.println("You'll lose :P!"); System.out.println(); return true; - } else if (input.equals("no")) { + } else if (input.equals("no") || input.equals("0")) { System.out.println("Beep beep..."); System.out.println(); return false; @@ -56,8 +56,8 @@ public static boolean askPrintCardsInfo() { while (true) { System.out.print("> "); String input = SC.nextLine().trim().toLowerCase(); - if (input.equals("yes")) return true; - else if (input.equals("no")) return false; + if (input.equals("yes") || input.equals("1")) return true; + else if (input.equals("no") || input.equals("0")) return false; System.out.println("Input \"yes\" or \"no\"..."); } }