Skip to content

Commit

Permalink
Change Calc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSorb committed Jan 21, 2024
1 parent 49ca52a commit a16aac8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/hexlet/code/games/Calc.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ public void changeQuestion() {
this.leftArg = Engine.randomIntValue(leftBorder, rightBorder);
this.rightArg = Engine.randomIntValue(leftBorder, rightBorder);
int numberOfOperation = Engine.randomIntValue(leftBorderOfOperation, rightBorderOfOperation);

final int startPlus = 1;
final int startMinus = 2;
final int startMultiplication = 3;
switch (numberOfOperation) {
case 1:
case startPlus:
plus();
break;
case 2:
case startMinus:
minus();
break;
case 3:
case startMultiplication:
multiplication();
break;
default:
Expand Down

0 comments on commit a16aac8

Please sign in to comment.