Baseball game dev diary: V1.1.2.202101012249 0x-1+1 =1 and 1x-1+1=0

  1. Added a team class, primarily to make it so that I could make the buttons on the diamond show up as team colours. ie When team 0 is batting, the base buttons have team 0 colours and the fielding buttons have team 1 colours, and vice versa when the teams switch. Batting buttons (bases etc) worked first go. Fielding buttons took a little longer as there was no existing logic to manage them.
  2. 0*-1+1 is 1 and 1*-1+1 is 0. Basically a guaranteed way to produce a 0 when a value is a 1 and get a 1 when a value is a 0. Used here to reverse the batting team value to avoid Ifs when working out the fielding team.


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