diff --git a/android/gradle.properties b/android/gradle.properties index d9abd55731010fe508f39321892e8002f10e79ef..663881258a10822c0b4abc064b6e0bc0ccf48833 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=0.0.12 -app.versionCode=12 +app.versionName=0.0.13 +app.versionCode=13 diff --git a/fastlane/metadata/android/en-US/changelogs/13.txt b/fastlane/metadata/android/en-US/changelogs/13.txt new file mode 100644 index 0000000000000000000000000000000000000000..b52679f2b1633d2073ac260b803cb8c0af88f8a3 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/13.txt @@ -0,0 +1 @@ +Disable delete bloc if animation is running. diff --git a/fastlane/metadata/android/fr-FR/changelogs/13.txt b/fastlane/metadata/android/fr-FR/changelogs/13.txt new file mode 100644 index 0000000000000000000000000000000000000000..9bfd903409fb68f5364cd3ddd1b5426b4f36025b --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/13.txt @@ -0,0 +1 @@ +Désactive la suppression de bloc si une animation est en cours. diff --git a/lib/ui/widgets/game_board.dart b/lib/ui/widgets/game_board.dart index 746ebbc572867642cb81689939ef30f5c5f2d601..c2ca025a77ef126eb1e07c3136fa436d9d2c82bc 100644 --- a/lib/ui/widgets/game_board.dart +++ b/lib/ui/widgets/game_board.dart @@ -104,13 +104,24 @@ class _GameBoard extends State<GameBoard> with TickerProviderStateMixin { return GestureDetector( onTapUp: (details) { - final double xTap = details.localPosition.dx; - final double yTap = details.localPosition.dy; - final int col = xTap ~/ (displayWidth / currentGame.settings.boardSize); - final int row = yTap ~/ (displayWidth / currentGame.settings.boardSize); - - final GameCubit gameCubit = BlocProvider.of<GameCubit>(context); - animateCells(gameCubit.tapOnCell(CellLocation.go(row, col))); + bool canRemoveCell = true; + animations.forEach((row) { + row.forEach((cell) { + if (cell != null) { + canRemoveCell = false; + } + }); + }); + + if (canRemoveCell) { + final double xTap = details.localPosition.dx; + final double yTap = details.localPosition.dy; + final int col = xTap ~/ (displayWidth / currentGame.settings.boardSize); + final int row = yTap ~/ (displayWidth / currentGame.settings.boardSize); + + final GameCubit gameCubit = BlocProvider.of<GameCubit>(context); + animateCells(gameCubit.tapOnCell(CellLocation.go(row, col))); + } }, child: CustomPaint( size: Size(displayWidth, displayWidth), diff --git a/pubspec.yaml b/pubspec.yaml index 8fd9227286dfeb8878bafa3adebcf8f3844e5d1e..614c574ef60477f311d9e23fe4f99430a0e74bac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Jeweled Game publish_to: 'none' -version: 0.0.12+12 +version: 0.0.13+13 environment: sdk: '^3.0.0'