Skip to content

Commit af3bc01

Browse files
committed
Fixed linter errors
1 parent 518eee3 commit af3bc01

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void gameRun(String gameRules, String[][] questionsAndAnswers) {
1414
String userName = input.next();
1515
System.out.println("Hello, " + userName + "!");
1616
System.out.println(gameRules);
17-
for (String [] questionAndAnswer : questionsAndAnswers) {
17+
for (String[] questionAndAnswer : questionsAndAnswers) {
1818
String question = questionAndAnswer[0];
1919
String answer = questionAndAnswer[1];
2020
System.out.println(question);

app/src/main/java/hexlet/code/games/CalcGame.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ public class CalcGame {
88
static final int COLUMN_INDEX = 3;
99
static final int ROW_INDEX = 2;
1010

11-
public static int getCalculation (int firstNumber, int secondNumber, char operator) {
11+
public static int getCalculation(int firstNumber, int secondNumber, char operator) {
1212
return switch (operator) {
13-
case '+' -> firstNumber + secondNumber;
14-
case '-' -> firstNumber - secondNumber;
15-
case '*' -> firstNumber * secondNumber;
16-
default -> throw new RuntimeException("Unknown input: " + operator);
17-
};
13+
case '+' -> firstNumber + secondNumber;
14+
case '-' -> firstNumber - secondNumber;
15+
case '*' -> firstNumber * secondNumber;
16+
default -> throw new RuntimeException("Unknown input: " + operator);
17+
};
1818
}
1919

2020
public static void calcGame() {

app/src/main/java/hexlet/code/games/PrimeGame.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ public class PrimeGame {
66
static final int MAX_NUMBER_VALUE = 100;
77
static final int COLUMN_INDEX = 3;
88
static final int ROW_INDEX = 2;
9+
static final int MIN_INDEX_TO_START = 3;
910

1011
public static boolean isPrime(int number) {
11-
int minIndex = 3;
12+
//int minIndex = 3;
1213
if (number < 2) {
1314
return false;
1415
}
@@ -18,7 +19,7 @@ public static boolean isPrime(int number) {
1819
if (number % 2 == 0) {
1920
return false;
2021
}
21-
for (int j = minIndex; j * j <= number; j += 2) {
22+
for (int j = MIN_INDEX_TO_START; j * j <= number; j += 2) {
2223
if (number % j == 0) {
2324
return false;
2425
}

0 commit comments

Comments
 (0)