An inning is over when the defense records three outs .
The offense has batted the entire lineup , whichever occurs first .
An inning is over when the defense records three outs or the offense has batted the entire lineup , whichever occurs first .