1.運用定義y軸移動方向的正負,例如:ball.y += 3 ,或ball.y -= 3。
2.set up function for handling screen refresh:運用定義球到達左右邊時做反彈的動作。
3.handle the space key:運用空白鍵使球能夠停止或者移動。