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

Merge branch '33-update-count-before-fill-board' into 'master'

Resolve "Update count before fill board"

Closes #33

See merge request !31
parents 2ef45d45 ffde67fa
No related branches found
No related tags found
1 merge request!31Resolve "Update count before fill board"
Pipeline #4302 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