https://github.com/matanlurey/gambit.dart
Simulate and test odds mechanics.
https://github.com/matanlurey/gambit.dart
dart dice odds rng
Last synced: 3 months ago
JSON representation
Simulate and test odds mechanics.
- Host: GitHub
- URL: https://github.com/matanlurey/gambit.dart
- Owner: matanlurey
- License: mit
- Created: 2024-04-15T21:16:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-28T16:29:39.000Z (12 months ago)
- Last Synced: 2025-02-14T22:35:25.239Z (5 months ago)
- Topics: dart, dice, odds, rng
- Language: Dart
- Homepage:
- Size: 172 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Gambit
Simulate and test odds-based mechanics such as dice rolls and more.
[](https://pub.dev/packages/gambit)
[](https://github.com/matanlurey/gambit.dart/actions/workflows/check.yaml)
[](https://coveralls.io/github/matanlurey/gambit.dart?branch=main)
[](https://pub.dev/documentation/gambit/latest/)## Usage
```dart
import 'package:gambit/gambit.dart';
```## Features
- Extensions on `Random` and a `Distribution` interface for custom mechanics;
- **Dice**: Roll and simulate dice of any size;
- **FixedRandom**: A `Random` implementation that returns a fixed value.## Contributing
To run the tests, run:
```shell
dart test
```To check code coverage locally, run:
```shell
dart pub global activate -sgit https://github.com/matanlurey/chore.dart.git --git-ref=8b252e7
chore coverage
```To preview `dartdoc` output locally, run:
```shell
chore dartdoc
```