Skip to content

Commit

Permalink
fix: roll when no dice can roll
Browse files Browse the repository at this point in the history
  • Loading branch information
z7workbench committed Feb 4, 2022
1 parent 6868aaa commit c107050
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/games/dices/yacht/yacht_dice_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class DiceNotifier with ChangeNotifier {
}

rollingDice() {
if (times > 0) {
if (times > 0 && roll.isNotEmpty) {
var random = Random();
int length = roll.length;
roll.clear();
Expand All @@ -380,8 +380,8 @@ class DiceNotifier with ChangeNotifier {
List.generate(locked.length, (index) => locked[index].count);
engine.updatePredict(dices);
times--;
notifyListeners();
}
notifyListeners();
}

keep(GesturedDiceWidget dice) {
Expand Down

0 comments on commit c107050

Please sign in to comment.