Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.colors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
org.benoitharrault.colors
Commits
0fe6c59f
Commit
0fe6c59f
authored
3 years ago
by
Benoît Harrault
Browse files
Options
Downloads
Patches
Plain Diff
Disable and do not count move if no change in board
parent
1371d1dd
No related branches found
No related tags found
1 merge request
!16
Resolve "Do not count move if no change in board"
Pipeline
#2808
passed
3 years ago
Stage: update
Stage: build-debug
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
android/gradle.properties
+2
-2
2 additions, 2 deletions
android/gradle.properties
lib/entities/cell.dart
+1
-1
1 addition, 1 deletion
lib/entities/cell.dart
lib/provider/data.dart
+4
-0
4 additions, 0 deletions
lib/provider/data.dart
lib/utils/board_utils.dart
+4
-1
4 additions, 1 deletion
lib/utils/board_utils.dart
with
11 additions
and
4 deletions
android/gradle.properties
+
2
−
2
View file @
0fe6c59f
org.gradle.jvmargs
=
-Xmx1536M
org.gradle.jvmargs
=
-Xmx1536M
android.useAndroidX
=
true
android.useAndroidX
=
true
android.enableJetifier
=
true
android.enableJetifier
=
true
app.versionName
=
0.0.1
5
app.versionName
=
0.0.1
6
app.versionCode
=
1
5
app.versionCode
=
1
6
This diff is collapsed.
Click to expand it.
lib/entities/cell.dart
+
1
−
1
View file @
0fe6c59f
...
@@ -39,7 +39,7 @@ class Cell {
...
@@ -39,7 +39,7 @@ class Cell {
fit:
BoxFit
.
fill
fit:
BoxFit
.
fill
),
),
onTap:
()
{
onTap:
()
{
if
(
!
myProvider
.
animationInProgress
)
{
if
(
!
myProvider
.
animationInProgress
&&
myProvider
.
getFirstCellValue
()
!=
this
.
value
)
{
BoardUtils
.
fillBoardFromFirstCell
(
myProvider
,
this
.
value
);
BoardUtils
.
fillBoardFromFirstCell
(
myProvider
,
this
.
value
);
}
}
},
},
...
...
This diff is collapsed.
Click to expand it.
lib/provider/data.dart
+
4
−
0
View file @
0fe6c59f
...
@@ -179,6 +179,10 @@ class Data extends ChangeNotifier {
...
@@ -179,6 +179,10 @@ class Data extends ChangeNotifier {
notifyListeners
();
notifyListeners
();
}
}
int
getFirstCellValue
()
{
return
_cells
[
0
][
0
]
.
value
;
}
int
get
movesCount
=
>
_movesCount
;
int
get
movesCount
=
>
_movesCount
;
void
updateMovesCount
(
int
movesCount
)
{
void
updateMovesCount
(
int
movesCount
)
{
_movesCount
=
movesCount
;
_movesCount
=
movesCount
;
...
...
This diff is collapsed.
Click to expand it.
lib/utils/board_utils.dart
+
4
−
1
View file @
0fe6c59f
...
@@ -81,7 +81,10 @@ class BoardUtils {
...
@@ -81,7 +81,10 @@ class BoardUtils {
myProvider
.
updateProgressDelta
(
progressDelta
);
myProvider
.
updateProgressDelta
(
progressDelta
);
myProvider
.
updateProgress
(
progressAfterMove
);
myProvider
.
updateProgress
(
progressAfterMove
);
if
(
progressDelta
!=
0
)
{
myProvider
.
incrementMovesCount
();
myProvider
.
incrementMovesCount
();
}
myProvider
.
updateAnimationInProgress
(
false
);
myProvider
.
updateAnimationInProgress
(
false
);
if
(
BoardUtils
.
checkBoardIsSolved
(
myProvider
))
{
if
(
BoardUtils
.
checkBoardIsSolved
(
myProvider
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment