Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.sudoku
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.sudoku
Compare revisions
130557eae2a3943cd6cd7b4c1c23c66c2ea9eca9 to 733cfb653f94e1befe80d96270135438b48c78d0
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
android/org.benoitharrault.sudoku
Select target project
No results found
733cfb653f94e1befe80d96270135438b48c78d0
Select Git revision
Swap
Target
android/org.benoitharrault.sudoku
Select target project
android/org.benoitharrault.sudoku
1 result
130557eae2a3943cd6cd7b4c1c23c66c2ea9eca9
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/utils/board_animate.dart
+10
-10
10 additions, 10 deletions
lib/utils/board_animate.dart
lib/utils/board_utils.dart
+91
-65
91 additions, 65 deletions
lib/utils/board_utils.dart
lib/utils/game_utils.dart
+8
-7
8 additions, 7 deletions
lib/utils/game_utils.dart
pubspec.yaml
+1
-1
1 addition, 1 deletion
pubspec.yaml
with
110 additions
and
83 deletions
lib/utils/board_animate.dart
View file @
733cfb65
...
...
@@ -4,14 +4,14 @@ import 'package:sudoku/provider/data.dart';
class
BoardAnimate
{
// Start game animation: blinking tiles
static
List
<
List
<
List
<
bool
>>>
createStartGameAnimationPatterns
(
Data
myProvider
)
{
List
<
List
<
List
<
bool
>>>
patterns
=
[];
static
AnimatedBoardSequence
createStartGameAnimationPatterns
(
Data
myProvider
)
{
AnimatedBoardSequence
patterns
=
[];
int
patternsCount
=
3
;
int
boardSideLength
=
myProvider
.
blockSizeHorizontal
*
myProvider
.
blockSizeVertical
;
for
(
int
patternIndex
=
0
;
patternIndex
<
patternsCount
;
patternIndex
++
)
{
List
<
List
<
bool
>>
pattern
=
[];
AnimatedBoard
pattern
=
[];
for
(
int
row
=
0
;
row
<
boardSideLength
;
row
++
)
{
List
<
bool
>
patternRow
=
[];
for
(
int
col
=
0
;
col
<
boardSideLength
;
col
++
)
{
...
...
@@ -26,14 +26,14 @@ class BoardAnimate {
}
// Win game animation: fill board with colored rows, from bottom to top
static
List
<
List
<
List
<
bool
>>>
createWinGameAnimationPatterns
(
Data
myProvider
)
{
List
<
List
<
List
<
bool
>>>
patterns
=
[];
static
AnimatedBoardSequence
createWinGameAnimationPatterns
(
Data
myProvider
)
{
AnimatedBoardSequence
patterns
=
[];
int
boardSideLength
=
myProvider
.
blockSizeHorizontal
*
myProvider
.
blockSizeVertical
;
int
patternsCount
=
boardSideLength
+
6
;
for
(
int
patternIndex
=
0
;
patternIndex
<
patternsCount
;
patternIndex
++
)
{
List
<
List
<
bool
>>
pattern
=
[];
AnimatedBoard
pattern
=
[];
for
(
int
row
=
0
;
row
<
boardSideLength
;
row
++
)
{
List
<
bool
>
patternRow
=
[];
for
(
int
col
=
0
;
col
<
boardSideLength
;
col
++
)
{
...
...
@@ -48,14 +48,14 @@ class BoardAnimate {
}
// Default multi-purpose animation: sliding stripes, from top left to right bottom
static
List
<
List
<
List
<
bool
>>>
createDefaultAnimationPatterns
(
Data
myProvider
)
{
List
<
List
<
List
<
bool
>>>
patterns
=
[];
static
AnimatedBoardSequence
createDefaultAnimationPatterns
(
Data
myProvider
)
{
AnimatedBoardSequence
patterns
=
[];
int
boardSideLength
=
myProvider
.
blockSizeHorizontal
*
myProvider
.
blockSizeVertical
;
int
patternsCount
=
boardSideLength
;
for
(
int
patternIndex
=
0
;
patternIndex
<
patternsCount
;
patternIndex
++
)
{
List
<
List
<
bool
>>
pattern
=
[];
AnimatedBoard
pattern
=
[];
for
(
int
row
=
0
;
row
<
boardSideLength
;
row
++
)
{
List
<
bool
>
patternRow
=
[];
for
(
int
col
=
0
;
col
<
boardSideLength
;
col
++
)
{
...
...
@@ -70,7 +70,7 @@ class BoardAnimate {
}
static
void
startAnimation
(
Data
myProvider
,
String
animationType
)
{
List
<
List
<
List
<
bool
>>>
patterns
=
[];
AnimatedBoardSequence
patterns
=
[];
switch
(
animationType
)
{
case
'start'
:
...
...
This diff is collapsed.
Click to expand it.
lib/utils/board_utils.dart
View file @
733cfb65
...
...
@@ -6,7 +6,7 @@ import 'package:sudoku/utils/random_pick_grid.dart';
import
'package:sudoku/utils/tools.dart'
;
class
BoardUtils
{
static
printGrid
(
List
<
List
<
Cell
>>
cells
,
List
<
List
<
Cell
>>
solvedCells
)
{
static
printGrid
(
Board
cells
,
Board
solvedCells
)
{
String
stringValues
=
'0123456789ABCDEFG'
;
printlog
(
''
);
printlog
(
'-------'
);
...
...
@@ -42,16 +42,21 @@ class BoardUtils {
myProvider
.
updateCellsSolved
(
BoardUtils
.
getSolvedGrid
(
myProvider
));
myProvider
.
selectCell
(
null
,
null
);
printGrid
(
myProvider
.
cells
,
myProvider
.
cells
Solved
);
printGrid
(
myProvider
.
board
,
myProvider
.
board
Solved
);
}
}
static
List
<
List
<
Cell
>>
createEmptyBoard
(
final
int
boardSize
)
{
final
List
<
List
<
Cell
>>
cells
=
[];
static
Board
createEmptyBoard
(
final
int
boardSize
)
{
final
Board
cells
=
[];
for
(
int
rowIndex
=
0
;
rowIndex
<
boardSize
;
rowIndex
++
)
{
final
List
<
Cell
>
row
=
[];
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
row
.
add
(
Cell
(
0
,
false
));
row
.
add
(
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
0
,
isFixed:
false
,
));
}
cells
.
add
(
row
);
}
...
...
@@ -59,8 +64,8 @@ class BoardUtils {
return
cells
;
}
static
List
<
List
<
Cell
>>
createBoardFromSavedState
(
Data
myProvider
,
String
savedBoard
)
{
final
List
<
List
<
Cell
>>
cells
=
[];
static
Board
createBoardFromSavedState
(
Data
myProvider
,
String
savedBoard
)
{
final
Board
cells
=
[];
final
int
boardSize
=
int
.
parse
(
pow
((
savedBoard
.
length
/
2
),
1
/
2
)
.
toStringAsFixed
(
0
));
const
String
stringValues
=
'0123456789ABCDEFG'
;
...
...
@@ -75,7 +80,12 @@ class BoardUtils {
final
String
isFixedString
=
savedBoard
[
index
++
];
final
bool
isFixed
=
(
isFixedString
!=
' '
);
row
.
add
(
Cell
(
value
,
isFixed
));
row
.
add
(
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
value
,
isFixed:
isFixed
,
));
}
cells
.
add
(
row
);
}
...
...
@@ -83,12 +93,17 @@ class BoardUtils {
return
cells
;
}
static
List
<
List
<
Cell
>>
copyBoard
(
List
cells
)
{
final
List
<
List
<
Cell
>>
copiedGrid
=
[];
static
Board
copyBoard
(
List
cells
)
{
final
Board
copiedGrid
=
[];
for
(
int
rowIndex
=
0
;
rowIndex
<
cells
.
length
;
rowIndex
++
)
{
final
List
<
Cell
>
row
=
[];
for
(
int
colIndex
=
0
;
colIndex
<
cells
[
rowIndex
]
.
length
;
colIndex
++
)
{
row
.
add
(
Cell
(
cells
[
rowIndex
][
colIndex
]
.
value
,
false
));
row
.
add
(
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
cells
[
rowIndex
][
colIndex
]
.
value
,
isFixed:
false
,
));
}
copiedGrid
.
add
(
row
);
}
...
...
@@ -96,8 +111,8 @@ class BoardUtils {
return
copiedGrid
;
}
static
List
<
List
<
Cell
>>
createBoardFromTemplate
(
String
grid
,
bool
isSymetric
)
{
List
<
List
<
Cell
>>
cells
=
[];
static
Board
createBoardFromTemplate
(
String
grid
,
bool
isSymetric
)
{
Board
cells
=
[];
final
int
boardSize
=
int
.
parse
(
pow
(
grid
.
length
,
1
/
2
)
.
toStringAsFixed
(
0
));
const
String
stringValues
=
'0123456789ABCDEFG'
;
...
...
@@ -108,7 +123,12 @@ class BoardUtils {
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
final
String
stringValue
=
grid
[
index
++
];
final
int
value
=
stringValues
.
indexOf
(
stringValue
);
row
.
add
(
Cell
(
value
,
(
value
!=
0
)));
row
.
add
(
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
value
,
isFixed:
(
value
!=
0
),
));
}
cells
.
add
(
row
);
}
...
...
@@ -131,11 +151,15 @@ class BoardUtils {
switch
(
flip
)
{
case
'horizontal'
:
{
final
List
<
List
<
Cell
>>
transformedBoard
=
createEmptyBoard
(
boardSize
);
final
Board
transformedBoard
=
createEmptyBoard
(
boardSize
);
for
(
int
rowIndex
=
0
;
rowIndex
<
boardSize
;
rowIndex
++
)
{
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
transformedBoard
[
rowIndex
][
colIndex
]
.
value
=
cells
[
boardSize
-
rowIndex
-
1
][
colIndex
]
.
value
;
transformedBoard
[
rowIndex
][
colIndex
]
=
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
cells
[
boardSize
-
rowIndex
-
1
][
colIndex
]
.
value
,
isFixed:
false
,
);
}
}
cells
=
transformedBoard
;
...
...
@@ -143,11 +167,15 @@ class BoardUtils {
break
;
case
'vertical'
:
{
final
List
<
List
<
Cell
>>
transformedBoard
=
createEmptyBoard
(
boardSize
);
final
Board
transformedBoard
=
createEmptyBoard
(
boardSize
);
for
(
int
rowIndex
=
0
;
rowIndex
<
boardSize
;
rowIndex
++
)
{
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
transformedBoard
[
rowIndex
][
colIndex
]
.
value
=
cells
[
rowIndex
][
boardSize
-
colIndex
-
1
]
.
value
;
transformedBoard
[
rowIndex
][
colIndex
]
=
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
cells
[
rowIndex
][
boardSize
-
colIndex
-
1
]
.
value
,
isFixed:
false
,
);
}
}
cells
=
transformedBoard
;
...
...
@@ -158,11 +186,15 @@ class BoardUtils {
switch
(
rotate
)
{
case
'left'
:
{
final
List
<
List
<
Cell
>>
transformedBoard
=
createEmptyBoard
(
boardSize
);
final
Board
transformedBoard
=
createEmptyBoard
(
boardSize
);
for
(
int
rowIndex
=
0
;
rowIndex
<
boardSize
;
rowIndex
++
)
{
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
transformedBoard
[
rowIndex
][
colIndex
]
.
value
=
cells
[
colIndex
][
boardSize
-
rowIndex
-
1
]
.
value
;
transformedBoard
[
rowIndex
][
colIndex
]
=
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
cells
[
colIndex
][
boardSize
-
rowIndex
-
1
]
.
value
,
isFixed:
false
,
);
}
}
cells
=
transformedBoard
;
...
...
@@ -170,11 +202,15 @@ class BoardUtils {
break
;
case
'right'
:
{
final
List
<
List
<
Cell
>>
transformedBoard
=
createEmptyBoard
(
boardSize
);
final
Board
transformedBoard
=
createEmptyBoard
(
boardSize
);
for
(
int
rowIndex
=
0
;
rowIndex
<
boardSize
;
rowIndex
++
)
{
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
transformedBoard
[
rowIndex
][
colIndex
]
.
value
=
cells
[
boardSize
-
colIndex
-
1
][
rowIndex
]
.
value
;
transformedBoard
[
rowIndex
][
colIndex
]
=
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
cells
[
boardSize
-
colIndex
-
1
][
rowIndex
]
.
value
,
isFixed:
false
,
);
}
}
cells
=
transformedBoard
;
...
...
@@ -185,8 +221,12 @@ class BoardUtils {
// Fix cells fixed states
for
(
int
rowIndex
=
0
;
rowIndex
<
boardSize
;
rowIndex
++
)
{
for
(
int
colIndex
=
0
;
colIndex
<
boardSize
;
colIndex
++
)
{
cells
[
rowIndex
][
colIndex
]
.
isFixed
=
(
cells
[
rowIndex
][
colIndex
]
.
value
!=
0
)
?
true
:
false
;
cells
[
rowIndex
][
colIndex
]
=
Cell
(
row:
rowIndex
,
col:
colIndex
,
value:
cells
[
rowIndex
][
colIndex
]
.
value
,
isFixed:
(
cells
[
rowIndex
][
colIndex
]
.
value
!=
0
)
?
true
:
false
,
);
}
}
...
...
@@ -194,7 +234,8 @@ class BoardUtils {
}
static
bool
checkBoardIsSolved
(
Data
myProvider
)
{
final
List
<
List
<
Cell
>>
cells
=
myProvider
.
cells
;
final
Board
cells
=
myProvider
.
board
;
final
ConflictsCount
conflicts
=
myProvider
.
boardConflicts
;
final
int
blockSizeHorizontal
=
myProvider
.
blockSizeHorizontal
;
final
int
blockSizeVertical
=
myProvider
.
blockSizeVertical
;
...
...
@@ -207,7 +248,7 @@ class BoardUtils {
// check grid is fully completed and does not contain conflict
for
(
int
row
=
0
;
row
<
boardSize
;
row
++
)
{
for
(
int
col
=
0
;
col
<
boardSize
;
col
++
)
{
if
(
cells
[
row
][
col
]
.
value
==
0
||
c
ell
s
[
row
][
col
]
.
conflictsCount
!=
0
)
{
if
(
cells
[
row
][
col
]
.
value
==
0
||
c
onflict
s
[
row
][
col
]
!=
0
)
{
return
false
;
}
}
...
...
@@ -219,7 +260,7 @@ class BoardUtils {
}
static
bool
isValueAllowed
(
List
<
List
<
Cell
>>
cells
,
Board
cells
,
int
blockSizeHorizontal
,
int
blockSizeVertical
,
int
?
candidateCol
,
...
...
@@ -300,7 +341,8 @@ class BoardUtils {
}
static
void
computeConflictsInBoard
(
Data
myProvider
)
{
final
List
<
List
<
Cell
>>
cells
=
myProvider
.
cells
;
final
Board
cells
=
myProvider
.
board
;
final
ConflictsCount
conflicts
=
myProvider
.
boardConflicts
;
final
int
blockSizeHorizontal
=
myProvider
.
blockSizeHorizontal
;
final
int
blockSizeVertical
=
myProvider
.
blockSizeVertical
;
...
...
@@ -310,7 +352,7 @@ class BoardUtils {
// reset conflict states
for
(
int
row
=
0
;
row
<
boardSize
;
row
++
)
{
for
(
int
col
=
0
;
col
<
boardSize
;
col
++
)
{
c
ell
s
[
row
][
col
]
.
conflictsCount
=
0
;
c
onflict
s
[
row
][
col
]
=
0
;
}
}
...
...
@@ -328,7 +370,7 @@ class BoardUtils {
printlog
(
'line
$row
contains duplicates'
);
// Add line to cells in conflict
for
(
int
col
=
0
;
col
<
boardSize
;
col
++
)
{
c
ell
s
[
row
][
col
]
.
conflictsCount
++
;
c
onflict
s
[
row
][
col
]
++
;
}
}
}
...
...
@@ -347,7 +389,7 @@ class BoardUtils {
printlog
(
'column
$col
contains duplicates'
);
// Add column to cells in conflict
for
(
int
row
=
0
;
row
<
boardSize
;
row
++
)
{
c
ell
s
[
row
][
col
]
.
conflictsCount
++
;
c
onflict
s
[
row
][
col
]
++
;
}
}
}
...
...
@@ -378,17 +420,19 @@ class BoardUtils {
for
(
int
colInBlock
=
0
;
colInBlock
<
blockSizeHorizontal
;
colInBlock
++
)
{
int
row
=
(
blockRow
*
blockSizeVertical
)
+
rowInBlock
;
int
col
=
(
blockCol
*
blockSizeHorizontal
)
+
colInBlock
;
c
ell
s
[
row
][
col
]
.
conflictsCount
++
;
c
onflict
s
[
row
][
col
]
++
;
}
}
}
}
}
myProvider
.
updateConflicts
(
conflicts
);
}
static
List
<
List
<
int
>>
getCellsWithWrongValue
(
final
List
<
List
<
Cell
>>
cells
,
final
List
<
List
<
Cell
>>
cellsSolved
,
final
Board
cells
,
final
Board
cellsSolved
,
final
int
blockSizeHorizontal
,
final
int
blockSizeVertical
,
)
{
...
...
@@ -407,31 +451,8 @@ class BoardUtils {
return
cellsWithWrongValue
;
}
static
List
<
List
<
int
>>
getConflictingCells
(
final
List
<
List
<
Cell
>>
cells
,
final
int
blockSizeHorizontal
,
final
int
blockSizeVertical
,
)
{
final
List
<
List
<
int
>>
conflictingCells
=
[];
final
int
boardSize
=
blockSizeHorizontal
*
blockSizeVertical
;
for
(
int
row
=
0
;
row
<
boardSize
;
row
++
)
{
for
(
int
col
=
0
;
col
<
boardSize
;
col
++
)
{
if
(
!
cells
[
row
][
col
]
.
isFixed
&&
cells
[
row
][
col
]
.
value
!=
0
)
{
if
(
cells
[
row
][
col
]
.
conflictsCount
!=
0
&&
!
BoardUtils
.
isValueAllowed
(
cells
,
blockSizeHorizontal
,
blockSizeVertical
,
col
,
row
,
cells
[
row
][
col
]
.
value
))
{
conflictingCells
.
add
([
col
,
row
]);
}
}
}
}
return
conflictingCells
;
}
static
List
<
List
<
int
>>
getCellsWithUniqueAvailableValue
(
List
<
List
<
Cell
>>
cells
,
Board
cells
,
final
int
blockSizeHorizontal
,
final
int
blockSizeVertical
,
)
{
...
...
@@ -460,8 +481,8 @@ class BoardUtils {
return
candidateCells
;
}
static
List
<
List
<
Cell
>>
getSolvedGrid
(
Data
myProvider
)
{
final
List
<
List
<
Cell
>>
cells
=
copyBoard
(
myProvider
.
cells
);
static
Board
getSolvedGrid
(
Data
myProvider
)
{
final
Board
cells
=
copyBoard
(
myProvider
.
board
);
final
int
blockSizeHorizontal
=
myProvider
.
blockSizeHorizontal
;
int
blockSizeVertical
=
myProvider
.
blockSizeVertical
;
...
...
@@ -479,7 +500,12 @@ class BoardUtils {
int
col
=
cellsWithUniqueAvailableValue
[
i
][
0
];
int
row
=
cellsWithUniqueAvailableValue
[
i
][
1
];
int
value
=
cellsWithUniqueAvailableValue
[
i
][
2
];
cells
[
row
][
col
]
.
value
=
value
;
cells
[
row
][
col
]
=
Cell
(
row:
row
,
col:
col
,
value:
value
,
isFixed:
cells
[
row
][
col
]
.
isFixed
,
);
}
}
while
(
true
);
...
...
This diff is collapsed.
Click to expand it.
lib/utils/game_utils.dart
View file @
733cfb65
import
'package:sudoku/entities/cell.dart'
;
import
'package:sudoku/provider/data.dart'
;
import
'package:sudoku/utils/board_animate.dart'
;
import
'package:sudoku/utils/board_utils.dart'
;
...
...
@@ -19,6 +18,8 @@ class GameUtils {
myProvider
.
shuffleCellValues
();
myProvider
.
updateCells
(
BoardUtils
.
createEmptyBoard
(
myProvider
.
blockSizeHorizontal
*
myProvider
.
blockSizeVertical
));
myProvider
.
initAnimatedBackground
();
myProvider
.
initConflictsBoard
();
BoardUtils
.
pickGrid
(
myProvider
);
BoardAnimate
.
startAnimation
(
myProvider
,
'start'
);
}
...
...
@@ -57,7 +58,7 @@ class GameUtils {
}
static
void
showTip
(
Data
myProvider
)
{
if
(
myProvider
.
current
CellCol
==
null
||
myProvider
.
current
CellRow
==
null
)
{
if
(
myProvider
.
selected
CellCol
==
null
||
myProvider
.
selected
CellRow
==
null
)
{
// no selected cell -> pick one
GameUtils
.
helpSelectCell
(
myProvider
);
}
else
{
...
...
@@ -68,14 +69,14 @@ class GameUtils {
}
static
void
helpSelectCell
(
Data
myProvider
)
{
final
List
<
List
<
Cell
>>
cells
=
myProvider
.
cells
;
final
Board
cells
=
myProvider
.
board
;
final
int
blockSizeHorizontal
=
myProvider
.
blockSizeHorizontal
;
final
int
blockSizeVertical
=
myProvider
.
blockSizeVertical
;
// pick one of wrong value cells, if found
final
List
<
List
<
int
>>
wrongValueCells
=
BoardUtils
.
getCellsWithWrongValue
(
cells
,
myProvider
.
cells
Solved
,
myProvider
.
board
Solved
,
blockSizeHorizontal
,
blockSizeVertical
,
);
...
...
@@ -116,7 +117,7 @@ class GameUtils {
}
static
void
helpFillCell
(
Data
myProvider
)
{
final
List
<
List
<
Cell
>>
cells
=
myProvider
.
cells
;
final
Board
cells
=
myProvider
.
board
;
final
int
blockSizeHorizontal
=
myProvider
.
blockSizeHorizontal
;
final
int
blockSizeVertical
=
myProvider
.
blockSizeVertical
;
...
...
@@ -129,13 +130,13 @@ class GameUtils {
int
allowedValuesCount
=
0
;
for
(
int
value
=
1
;
value
<
=
boardSize
;
value
++
)
{
if
(
BoardUtils
.
isValueAllowed
(
cells
,
blockSizeHorizontal
,
blockSizeVertical
,
myProvider
.
current
CellCol
,
myProvider
.
current
CellRow
,
value
))
{
myProvider
.
selected
CellCol
,
myProvider
.
selected
CellRow
,
value
))
{
allowedValuesCount
++
;
eligibleValue
=
value
;
}
}
myProvider
.
updateCellValue
(
myProvider
.
current
CellCol
,
myProvider
.
current
CellRow
,
myProvider
.
updateCellValue
(
myProvider
.
selected
CellCol
,
myProvider
.
selected
CellRow
,
allowedValuesCount
==
1
?
eligibleValue
:
0
);
myProvider
.
selectCell
(
null
,
null
);
if
(
BoardUtils
.
checkBoardIsSolved
(
myProvider
))
{
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
View file @
733cfb65
name
:
sudoku
description
:
A sudoku game application.
publish_to
:
'
none'
version
:
0.1.1
5
+6
4
version
:
0.1.1
8
+6
7
environment
:
sdk
:
'
^3.0.0'
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next