Internal Helper Functions

These assorted functions are used within the simulation and are not intended to be used as part of the the public interface.

Functions

bool is_slow_bowler(BowlType bowl_type)

Determine whether a given bowling type is “slow” (i.e. spin or medium pace)

The passed bowling type is checked via a switch statement.

Return
A boolean indicating whether the bowling type is slow (true) or not (false).
Parameters
  • bowl_type: The bowling type, encoding as the appropriate enum.