Skip to content

Commit

Permalink
When two mobbers, swap instead of shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonfagan committed Oct 6, 2023
1 parent 8a73d0b commit 1ab05f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/providers/mobbers_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class Mobbers extends Notifier<List<Mobber>> {
}

void shuffle() {
if (state.length == 2) {
state = [state[1], state[0]];
return;
}

final temp = state;
temp.shuffle();

Expand Down

0 comments on commit 1ab05f9

Please sign in to comment.