Enumerations¶
Types¶
Warning
doxygenenum: Cannot find enum “Hand” in doxygen xml output for project “testmatch” from directory: xml
-
enum
BowlType¶ Represents the bowling type of a player, without the arm.
Values:
-
med¶ Medium paced bowling. String representation of “m”.
-
med_fast¶ Medium-fast paced bowling. String representation of “mf”.
-
fast_med¶ Fast-medium paced bowling. String representation of “fm”.
-
fast¶ Fast paced bowling. String representation of “f”.
-
offbreak¶ Offspin bowling. Note that this can refer to either right-arm fingerspin or left-arm wristspin. String representation of “ob”.
-
legbreak¶ Legspin bowling. Note that this can refer to either right-arm wristspin or left-arm finger. String representation of “lb”.
-
-
enum
DismType¶ Represents the type of dismissal.
Values:
-
bowled¶ Bowled. String representation of “b”.
-
lbw¶ Leg before wicket. String representation of “lbw”.
-
caught¶ Caught by fielder. String representation of “c”.
-
c_and_b¶ Caught and bowled by bowler. String representation of “c&b”.
-
run_out¶ Run out. String representation of “ro”.
-
stumped¶ Stumped by wicketkeeper. String representation of “st”.
-
-
enum
ResultType¶ Represents the possible results of a match. Note that string representations of this enumeration are handled by the MatchResult object.
Values:
-
draw¶ Drawn match.
-
win_chasing¶ Win by batting team in fourth innings, i.e. the batting team have successfully reached the target.
-
win_bowling¶ Win by bowling team in the fourth innings, i.e. the batting team have been bowled out before reaching the target.
-
win_innings¶ Win by an innings, i.e. the batting team have been bowled out in the third innings while still trailing.
-
tie¶ Tied match, i.e. the batting team has been bowled out in the fourth innings with the scores level.
-
Conversion Functions¶
Each enumeration also includes functions for converting to and from string representations, via the :function:`str` signature. For example,
BowlType bt = fast_med;
Arm arm = right;
str(arm) // Returns "right"
chr(arm) // Return 'r'
str(bt) // Returns "fm"
long_str(arm, bt) // Returns "right-arm fast-medium"