Scanner close

master
s.eser 2024-04-24 23:13:42 +02:00
parent 429c736e7c
commit 043283e86e
2 changed files with 4 additions and 1 deletions

View File

@ -9,12 +9,13 @@ public class TUI {
public static void main(String[] args) {
System.out.println("Willkommen zum BlackJack Trainer");
BlackJackSpiel bj = new BlackJackSpiel();
Scanner sc = new Scanner(System.in);
while(true){
int t = 1;
String eingabe = "";
System.out.println("Möchten Sie ein neues Spiel anfangen? (Ja/Nein)");
Scanner sc = new Scanner(System.in);
if (sc.nextLine().equalsIgnoreCase("Ja")) {
bj.getNeueHand();
@ -55,5 +56,7 @@ public class TUI {
break;
}
}
sc.close();
}
}