Skip to content

Commit 139d75a

Browse files
author
Aleksandr Pronichev
committed
fix Engine.java
1 parent c599eb7 commit 139d75a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/src/main/java/hexlet/code/Engine.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ public class Engine {
66
public static final int ROUNDS = 3;
77

88
public static void game(String rules, String[][] questionsAndAnswers) {
9-
String userName = greeting();
10-
System.out.println(rules);
11-
129
Scanner scanner = new Scanner(System.in);
1310

11+
System.out.println("Welcome to the Brain Games!");
12+
System.out.print("May I have your name? ");
13+
String userName = scanner.next();
14+
System.out.println("Hello, " + userName + "!");
15+
System.out.println(rules);
16+
1417
for (int i = 0; i < Engine.ROUNDS; i++) {
1518
System.out.println("Question: " + questionsAndAnswers[i][0]);
1619
System.out.print("Your answer: ");

0 commit comments

Comments
 (0)