Class Overs


public final class Overs extends Object
Contains one static methood, returns where the ball is hit when given the batting factor and random number (dice roll) between 0 and 20 inclusive.
Version:
3-14-24
Author:
L Kedigh
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getOversRoll(String battingFactor, int location)
    Given the batting factor (example 2A) and a random number between 0 and 20 inclusive, this method returns the overs chart string of where the ball is hit.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • baseRunners

      static String baseRunners
  • Constructor Details

    • Overs

      public Overs()
  • Method Details

    • getOversRoll

      public static String getOversRoll(String battingFactor, int location)
      Given the batting factor (example 2A) and a random number between 0 and 20 inclusive, this method returns the overs chart string of where the ball is hit. The last three characters represent the fielding chart to use. Example "Fly Ball to RF FC2", Fly Ball to RF represents where the ball is hit. FC2 represents the fielding chart to use to get the result of the play.