As the game stands, the ball is moving downward and whenever your finger touches it, it will get flung in another direction (to be exact, 360 degrees minus the direction it was heading). We can program the app so the ball only responds to a fling when it is below the middle of the screen. Can you guess how we might program this? If you guessed using an if/then block, you're on the right track! If the ball is below the middle of the screen, then it can be flung.
Currently, our blocks look like the following screenshot:
We want to tell the app to first check and see whether the ball is below the middle of the screen. We've coded something similar if you recall when we used the Screen1.Width block. Since we won't know the screen size of every user, we cannot just input a specific number and divide it by 2. But we can get the user's screen size with the Screen1.Height block and divide this by 2. In Chapter 3, Navigating the App Inventor Platform, you also learned that...