diff --git a/android/gradle.properties b/android/gradle.properties index 16365f29cf89bd3e2d47c5765ff7f008a194ecdc..cfe1f46b5f8d528a00df0b970d82b0a0f7297079 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=1.0.42 -app.versionCode=43 +app.versionName=1.0.43 +app.versionCode=44 diff --git a/lib/ui/widgets/game/game_board.dart b/lib/ui/widgets/game/game_board.dart index 47453badc4b525abc18890a3e0e360fa6eb79536..6f11e5bac6bb4fd9c56a2cd10b7a501af7418a52 100644 --- a/lib/ui/widgets/game/game_board.dart +++ b/lib/ui/widgets/game/game_board.dart @@ -153,14 +153,27 @@ class _GameBoardWidget extends State<GameBoardWidget> with TickerProviderStateMi return GestureDetector( child: buildBoard(), onTapUp: (details) { - double xTap = details.localPosition.dx; - double yTap = details.localPosition.dy; - - int x = (xTap / widgetWidth * columnsCount).toInt(); - int y = (yTap / widgetHeight * rowsCount).toInt(); - print('[' + x.toString() + ',' + y.toString() + ']'); - - removeCell(context, x, y); + bool canRemoveCell = true; + animations.forEach((row) { + row.forEach((cell) { + if (cell != null) { + canRemoveCell = false; + } + }); + }); + + if (canRemoveCell) { + double xTap = details.localPosition.dx; + double yTap = details.localPosition.dy; + + int x = (xTap / widgetWidth * columnsCount).toInt(); + int y = (yTap / widgetHeight * rowsCount).toInt(); + print('[' + x.toString() + ',' + y.toString() + ']'); + + removeCell(context, x, y); + } else { + print('animation in progress...'); + } }, ); } diff --git a/pubspec.yaml b/pubspec.yaml index fd959baf6c84597fc48965eae46b871772d40190..499f579c251cc60572d357eda98f5d4fdccd65e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A random application, for testing purpose only. publish_to: 'none' -version: 1.0.42+43 +version: 1.0.43+44 environment: sdk: '^3.0.0'