Class Game2


public class Game2 extends Object
Plays one or more games. Requires Lineup codes to play.
List of some Team Codes.
  2024 Philadelphia Phillies 242700 
  2024 Atlanta Braves        242400 
  1967 Atlanta Braves        672400 
  1967 New York Mets         672601  
  1967 Baltimore Orioles     670100 
  1967 Los Angeles Dodgers   672500 
  1967 Cleveland Indians     6704137 Tiant 25
  1967 Chicago Cubs          672200 
  1967 Cincinnati Reds       672300 
  1967 Pittsburg Pirates     672800
  1967 Cleveland Indians     6704035 McDowell 20
 
Version:
9-28-24
Author:
L Kedigh
  • Field Details

    • outputStats

      public static boolean outputStats
      Flag to send stats to the output.
    • showAppearanceOutcomeST

      public static boolean showAppearanceOutcomeST
      Flag to send the appearance outcome to the monitor
    • showPauseAfterOutcomeST

      public static boolean showPauseAfterOutcomeST
      Flag to send the Choice on FC outcome to the monitor
    • teamOutsST

      public static int teamOutsST
      current team OUTS
    • teamRunsST

      public static int teamRunsST
      current team RUNS
    • teamErrorsST

      public static int teamErrorsST
      current team ERRORS
    • teamHitsST

      public static int teamHitsST
      current team HITS
    • pitchRollResults

      public final String[] pitchRollResults
      One of four possible outcomes off the Pitching Chart: Overs, Corners, walk, strike out
    • pitchChartLimits

      public int[] pitchChartLimits
      Limits seperating walk,overs,corners,strikeout
    • vCurrentBatterIndex

      public int vCurrentBatterIndex
      Index in the batting order of the current VISITOR batter
    • hCurrentBatterIndex

      public int hCurrentBatterIndex
      Index in the batting order of the current HOME batter
    • visitingPitcher

      public Pitcher visitingPitcher
      VISITOR starting pitcher
    • homeLineUp

      public LineUp homeLineUp
      HOME Line Up
    • homePitcher

      public Pitcher homePitcher
      HOME starting pitcher
    • cvScore

      public int cvScore
      VISITOR cumulative score to the current inning
    • chScore

      public int chScore
      HOME cumulative score to the current inning
    • cvHits

      public int cvHits
      Visitors cumulative HITS
    • chHits

      public int chHits
      Home cumulative HITS
    • cvErrors

      public int cvErrors
      Visitor cumulative ERRORS
    • chErrors

      public int chErrors
      Home cumulative ERRORS
    • vScore

      ArrayList of the VISITOR team's score by inning
    • hScore

      ArrayList of the HOME team's score by inning
    • inn

      public int inn
      Inning of the game
    • counter

      public int counter
      Counter which determines which side is batting
    • pitchResult

      public String pitchResult
      Result of the pitch from the overs and corners charts
    • outcome

      public String outcome
      Outcome of the Appearance
  • Constructor Details

    • Game2

      public Game2()
  • Method Details

    • play

      public void play(int numOfGames, int vID, int hID)
      Plays one or more games.
      Parameters:
      numOfGames - The number of game to be played.
      vID - Visiting Team ID number.
      hID - Home Team ID number.
    • getPitchRollResult

      public String getPitchRollResult(Pitcher p, PositionPlayer b)

      First roll using the pitching chart, determines and returns WALK,OVERS,CORNERS, or STRIKE OUT.
      The first chart I call the pitching chart.
      Two dice determine if the batter is walked (WALK) or struck out(STRIKE OUT) which ends the appearance.
      CORNERS and OVERS results in more throws of dice and additional charts.

      Parameters:
      p - The Pitcher in the appearance.
      b - The Batter in the appearance.
      Returns:
      returns one of the following- WALK,OVERS,CORNERS, or STRIKE OUT