Checking the Answer with a Button
In the previous task, when we move our ray (line segment indeed) to guess the angle, the feedback were showing up based on the position. However, in the real game, we do not want that happen; however, we want the same feedback shows up when a "Check" button is clicked. We will use the same boolean values for checking the angle's position. Then, we will use that information to show the feedback. There are several ways of achieving this task. We will investigate some of them. You may use your creativity for other ways as well.
Play with the new applet and tell me what happens when the New Angle and Check buttons are clicked.
What codes do you think I added to the buttons?
You may try your guesses below.