Skip to content

Commit

Permalink
Improve getNextSideNum(...) function
Browse files Browse the repository at this point in the history
Signed-off-by: Sophie Frasnedo <[email protected]>
  • Loading branch information
So-Fras committed Dec 11, 2023
1 parent 53bdc32 commit aa7a2cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ private ThreeSides[] getSidesArray(ThreeSides sideA) {
}

private int getNextSideNum(int sideNum, int steps) {
return (sideNum + steps) % 3 == 0 ? 3 : (sideNum + steps) % 3;
return (sideNum + steps + 2) % 3 + 1;
}
}

0 comments on commit aa7a2cb

Please sign in to comment.