prevent ball from moving out of board