Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovsenka committed Jun 2, 2024
1 parent b9ca6f5 commit 4bb6c77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/hexlet/code/games/PrimeGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class PrimeGame {
private static final int MAX_RANDOM_NUMBER = 100;

public static void runGame() {
Engine.setScore(9);
Engine.setScore(0);
while (Engine.getScore() != Engine.COUNT_ROUNDS) {
int number = RANDOM.nextInt(MAX_RANDOM_NUMBER) + 1;
String correctAnswer;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/hexlet/code/games/ProgressionGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class ProgressionGame {
private static final Random RANDOM = new Random();
private static final int MAX_LEN_PROGRESSION = 10;
private static final int BOUND_PROGRESSION = 10;
private static final int MIN_LEN_PROGRESSION = 5;
private static final int MAX_INIT_VALUE = 25;
private static final int MAX_D_VALUE = 15;
Expand All @@ -15,7 +15,7 @@ public static void runGame() {
StringBuilder progression = new StringBuilder();
int d = RANDOM.nextInt(MAX_D_VALUE) + 1;
int value = RANDOM.nextInt(MAX_INIT_VALUE) + 1;
int lengthProgression = RANDOM.nextInt(MAX_LEN_PROGRESSION) + MIN_LEN_PROGRESSION;
int lengthProgression = RANDOM.nextInt(BOUND_PROGRESSION) + MIN_LEN_PROGRESSION;
int position = RANDOM.nextInt(lengthProgression);
String correctAnswer = "";
for (int i = 0; i < lengthProgression; i++) {
Expand Down

0 comments on commit 4bb6c77

Please sign in to comment.