added next state logic to pong_control for ball bounds checking