Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
829645c1
Commit
829645c1
authored
Sep 10, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1107 from sgraham/fiddle-mine-digger
mine_digger: Fix not being able to de-flag on Android
parents
67410a5a
4a7718d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
main.dart
examples/mine_digger/lib/main.dart
+11
-12
No files found.
examples/mine_digger/lib/main.dart
View file @
829645c1
...
...
@@ -106,9 +106,12 @@ class MineDiggerApp extends App {
if
(
state
!=
CellState
.
exploded
)
state
=
cells
[
iy
][
ix
]
?
CellState
.
shown
:
state
;
}
if
(
state
==
CellState
.
covered
)
{
if
(
state
==
CellState
.
covered
||
state
==
CellState
.
flagged
)
{
row
.
add
(
new
GestureDetector
(
onTap:
()
=>
probe
(
ix
,
iy
),
onTap:
()
{
if
(
state
==
CellState
.
covered
)
probe
(
ix
,
iy
);
},
onLongPress:
()
{
activity
.
userFeedback
.
performHapticFeedback
(
activity
.
HapticFeedbackType_LONG_PRESS
);
flag
(
ix
,
iy
);
...
...
@@ -116,21 +119,17 @@ class MineDiggerApp extends App {
child:
new
Listener
(
onPointerDown:
_pointerDownHandlerFor
(
ix
,
iy
),
child:
new
CoveredMineNode
(
flagged:
false
,
flagged:
state
==
CellState
.
flagged
,
posX:
ix
,
posY:
iy
)
)
));
// Mutating |hasCoveredCell| here is hacky, but convenient, same
// goes for mutating |hasWon| below.
hasCoveredCell
=
true
;
}
else
if
(
state
==
CellState
.
flagged
)
{
row
.
add
(
new
CoveredMineNode
(
flagged:
true
,
posX:
ix
,
posY:
iy
));
if
(
state
==
CellState
.
covered
)
{
// Mutating |hasCoveredCell| here is hacky, but convenient, same
// goes for mutating |hasWon| below.
hasCoveredCell
=
true
;
}
}
else
{
row
.
add
(
new
ExposedMineNode
(
state:
state
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment