added code to keep track of at-bat results based on the three pitch sequence at the end