Baseball game dev diary V0.5.2.202012032305 Prepping for pitchers

  1. Created a player class. No such thing as a record anymore. Chose Class over Structure due to some web page recommendation. Was reminded that when variables within classes are set to private, you can’t change them outside of that class. So created a Property for each variable within the class that uses the Get and Set commands to read and write the values in the instances of a class. The private variable starts with an underscore, the property is the same name without the underscore. This should make coding the main game much easier.
  2. Presently, properties are: id, last name, first name, primary position, secondary positions, player type, pitches thrown, energy, stamina and game status.
  3. Created 28 instances of players for each team (scaled back from 40 for now).
  4. Made the base buttons clickable and each calls a procedure that is designed to show info for the batter/runner, but only when base is occupied. Later on will disable the buttons (including batter) if base is not occupied (or in between batters in the case of the batter button). 
  5. Moved some button toggles into their own procedures (when start game and reset game are clicked, they now do the same thing; when end of game or after simming have button toggle procedures.



Comments

Popular posts from this blog

MLB (Road to) The Show attribute progression

MLB The Show 21: create a stadium prediction & using created stadiums in online games

V1.1.4.202103032300 Basic player creator, line score tidy up and additional play results, including errors