Baseball game dev diary version 0.0.1.202010242359: random plate appearances

  1. Set up as single plate appearance button with randomised ball and strike counts. Result randomised between 0 and 9:

    0: strikeout

    1-6: in play, out

    7-8: hit, run

    9: walk or HBP, run

  2. Output result and count to text box.
Wish I'd taken a screenshot. Just imagine three numbers in a single textbox and that's all it was.

That's pretty much it for the first version. Not my proudest moment in programming, but then again, it was probably about 11.30pm when I sat down to start. But hey, the hardest part is starting. It's all smooth sailing from this point on.


Incidentally, because it had been so long since I did any program design that relied on user input to progress through the program, it didn't occur to me that using a loop to cycle through innings would be impractical. Hence I pretty much ignored my scratchings above, and will probably ignore the below too.



Comments

Popular posts from this blog

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

MLB (Road to) The Show attribute progression

Writing a baseball game