We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c599eb7 commit 139d75aCopy full SHA for 139d75a
app/src/main/java/hexlet/code/Engine.java
@@ -6,11 +6,14 @@ public class Engine {
6
public static final int ROUNDS = 3;
7
8
public static void game(String rules, String[][] questionsAndAnswers) {
9
- String userName = greeting();
10
- System.out.println(rules);
11
-
12
Scanner scanner = new Scanner(System.in);
13
+ System.out.println("Welcome to the Brain Games!");
+ System.out.print("May I have your name? ");
+ String userName = scanner.next();
14
+ System.out.println("Hello, " + userName + "!");
15
+ System.out.println(rules);
16
+
17
for (int i = 0; i < Engine.ROUNDS; i++) {
18
System.out.println("Question: " + questionsAndAnswers[i][0]);
19
System.out.print("Your answer: ");
0 commit comments