Skip to content

Commit 0ffdb8f

Browse files
committed
fix erors of checkstyle
1 parent 92a233d commit 0ffdb8f

File tree

6 files changed

+26
-26
lines changed

6 files changed

+26
-26
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
public class App {
1212

13-
final static int COUNT_LEVELS = 3;
14-
final static int START_CLI = 1;
15-
final static int START_EXIT = 0;
16-
final static int START_EVEN = 2;
17-
final static int START_CALC = 3;
18-
final static int START_GCD = 4;
19-
final static int START_PROGRESSION = 5;
20-
final static int START_PRIME = 6;
21-
final static String[] GAME_NAME = {"Exit", "Greet", "Even", "Calculator", "GCD", "Progression","Prime"};
13+
private static final int COUNT_LEVELS = 3;
14+
private static final int START_CLI = 1;
15+
private static final int START_EXIT = 0;
16+
private static final int START_EVEN = 2;
17+
private static final int START_CALC = 3;
18+
private static final int START_GCD = 4;
19+
private static final int START_PROGRESSION = 5;
20+
private static final int START_PRIME = 6;
21+
private static final String[] GAME_NAME = {"Exit", "Greet", "Even", "Calculator", "GCD", "Progression", "Prime"};
2222
public static void main(String[] args) {
2323

2424
App.printMenu();

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ public static void winGame(String userName) {
2121
System.out.println("Congratulations, " + userName + "!");
2222
}
2323
public static void wrongAnswer(String userAnswer, String rightAnswer, String userName) {
24-
String wrongMassage = "'" +
25-
userAnswer +
26-
"' is wrong answer ;(. Correct answer was '" +
27-
rightAnswer +
28-
"'.";
29-
30-
String restartMassage = "Let's try again, " +
31-
userName +
32-
"!";
24+
String wrongMassage = "'"
25+
+ userAnswer
26+
+ "' is wrong answer ;(. Correct answer was '"
27+
+ rightAnswer
28+
+ "'.";
29+
30+
String restartMassage = "Let's try again, "
31+
+ userName
32+
+ "!";
3333

3434
System.out.println(wrongMassage);
3535
System.out.println(restartMassage);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import hexlet.code.Engine;
44
public class Calc {
5-
final static String GAME_RULE = "What is the result of the expression?";
6-
final static String[] SYMBOLS_OPERATION = {"+", "-", "*"};
7-
final static int MAX_NUMBER = 10;
8-
final static int MIN_NUMBER = 1;
5+
private static final String GAME_RULE = "What is the result of the expression?";
6+
private static final String[] SYMBOLS_OPERATION = {"+", "-", "*"};
7+
private static final int MAX_NUMBER = 10;
8+
private static final int MIN_NUMBER = 1;
99

1010
public static void start(int countLevels) {
1111
String userName = Engine.greeting();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import hexlet.code.Engine;
44

55
public class Even {
6-
final static private String GAME_RULE = "Answer 'yes' if the number is even, otherwise answer 'no'.";
6+
private static final String GAME_RULE = "Answer 'yes' if the number is even, otherwise answer 'no'.";
77

88
public static void start(int countLevels) {
99
String userName = Engine.greeting();
1010
Engine.printGameRules(GAME_RULE);
1111

1212
for (int i = 0; i < countLevels; i++) {
1313
int question = Engine.randomIntValue();
14-
String rightAnswer = Even.isEven(question) ? "yes" : "no";;
14+
String rightAnswer = Even.isEven(question) ? "yes" : "no";
1515

1616
Engine.askQuestion(Integer.toString(question));
1717
String userAnswer = Engine.getAnswer();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import hexlet.code.Engine;
44

55
public class GCD {
6-
final static String GAME_RULE = "Find the greatest common divisor of given numbers.";
6+
private static final String GAME_RULE = "Find the greatest common divisor of given numbers.";
77

88
public static void start(int countLevels) {
99
String userName = Engine.greeting();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static void start(int countLevels) {
1212

1313
for (int i = 0; i < countLevels; i++) {
1414
int question = Engine.randomIntValue();
15-
String rightAnswer = Prime.isPrimeNumber(question) ? "yes" : "no";;
15+
String rightAnswer = Prime.isPrimeNumber(question) ? "yes" : "no";
1616

1717
Engine.askQuestion(Integer.toString(question));
1818
String userAnswer = Engine.getAnswer();

0 commit comments

Comments
 (0)