Expand description
This is a rust lib that allows for the calculation of target scores for the team batting second in a cricket match that has been affected by weather 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.
§Features
cli: Produces a binary that provides a command line interface for using the calculator
ser: Allows the various objects in this crate to be de/serializable using Serde. Included if cli feature used
Structs§
- Cricket
Match - Representation of a cricket match, used to hold the basic details of the match and the details of any interruptions that have occurred during the match
- Overs
- A struct that represents a length of overs. Can handle both whole number of overs and an incomplete number of overs
Enums§
- Duckworth
Lewis Error - Grade
- The relevant Grade of the teams involved in this match. Note that this is the teams grade not the match grade. That means that the the grade is the highest level that that team is eligible to play, not that the grade of the match being played.
- Innings
- The innings that the match is in. As Duckworth Lewis is only relevant for limited overs matches (and Cricket Max is dead), this can never include a third or a fourth innings