Skip to content
Snippets Groups Projects
Commit ffde67fa authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Increment moves count on each move

parent 2ef45d45
No related branches found
No related tags found
1 merge request!31Resolve "Update count before fill board"
Pipeline #4291 passed
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.0.30
app.versionCode=30
app.versionName=0.0.31
app.versionCode=31
Update moves count even without board change
Mise à jour du nombre de coups même si aucun changement sur le plateau
......@@ -64,6 +64,8 @@ class BoardUtils {
]);
int progressBeforeMove = cellsToFill.length;
myProvider.incrementMovesCount();
// Sort cells from the closest to the furthest, relatively to the top left corner
cellsToFill
.sort((a, b) => (pow(a[0], 2) + pow(a[1], 2)).compareTo(pow(b[0], 2) + pow(b[1], 2)));
......@@ -88,10 +90,6 @@ class BoardUtils {
myProvider.updateProgressDelta(progressDelta);
myProvider.updateProgress(progressAfterMove);
if (progressDelta != 0) {
myProvider.incrementMovesCount();
}
myProvider.updateAnimationInProgress(false);
if (BoardUtils.checkBoardIsSolved(myProvider)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment