multiple_random_choice 0.1.1 copy "multiple_random_choice: ^0.1.1" to clipboard
multiple_random_choice: ^0.1.1 copied to clipboard

outdated

A function library to choose multiple items randomly. This library supports weighted randomly choosing too. Typical examples of usage are lottery and gacha.

A multiple randomly choosing function library

Features #

  • generate multiple random choice under equally probability from options
  • generate multiple random choice with weight from options

Usage / Example #

final m = {
  'A': 1.0,
  'B': 2.0,
  'C': 10.0,
  'D': 20,
  'E': 1,
};
final s = randomMultipleWeightedChoice<String>(m, 3);
print(s);
// {C,D,B}

You can see more examples in example folder.

4
likes
0
points
13
downloads

Publisher

verified publisherhrimfaxi-lab.com

Weekly Downloads

A function library to choose multiple items randomly. This library supports weighted randomly choosing too. Typical examples of usage are lottery and gacha.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on multiple_random_choice