# Baseball Game help?

**URL:** <https://forum.kirupa.com/t/baseball-game-help/267796>\
**Category:** Uncategorized\
**Created:** [August 5, 2008, 8:04pm UTC](https://forum.kirupa.com/t/baseball-game-help/267796 "2008-08-05T20:04:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiwanejko](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jiwanejko](https://forum.kirupa.com/u/jiwanejko)\
**Post date:** [August 5, 2008, 8:04pm UTC](https://forum.kirupa.com/t/baseball-game-help/267796/1 "2008-08-05T20:04:57Z")

</div>

Hi, I’m trying to write a program that will simulate an inning of a baseball game. Basically, it returns a random pitch…( either a ball or strike) and keeps track of the count…(balls, strikes, outs)… I have the code working fine. It will keep looping through, until it reaches 3 outs… What I want to do with this… Is display the pitch result after each pitch on the screen. Nothing too crazy, just… Strike 1, ball 1 etc. This is where I’m stuck??  
I’m not sure how to tie it all together??

I also have another .swf file that simulates the baseball being pitched. It’s just a quick image of a ball coming out towards the front of the screen, like someone was pitching to you and you are the batter. I would like to generate this .swf to play on each pitch, if possible?

Any suggestions would be appreciated.

Thanks, John.
