Crates.io | duckworth-lewis |
lib.rs | duckworth-lewis |
version | 0.1.0 |
source | src |
created_at | 2023-01-08 00:00:56.985319 |
updated_at | 2023-01-08 00:00:56.985319 |
description | A calculator for determining targets for the team batting second in weather affected cricket matches using the Duckworth Lewis Standard Edition methodology |
homepage | |
repository | https://github.com/crangiopharengoma/duckworth-lewis |
max_upload_size | |
id | 753294 |
size | 370,541 |
This is a simple rust lib that allows for target scores to be calculated using the Duckworth Lewis Standard Edition method. Currently the Professional Edition and Duckworth-Lewis-Stern methodologies aren't published (anywhere that I'm aware of) so I can't implement them here. Note that international cricket uses the Duckworth-Lewis-Stern method so the results from this lib won't match what you see on TV.
This crate includes an optional CLI that can be used to play with the calculator. Include the feature 'cli' when building/running if you want to try it out. Use dlc help to get more information about how to use the cli.
The feature 'ser' allows for de/serialization (using serde) of the various structs and enums. This is required by the cli feature but can be separately enabled if you wanted it.
The below sequence of commands shows the necessary steps to capture the following scenario:
dlc new 50 icc-full-member
dlc int 1 38 10 first
dlc target 250