Due: Thursday, Nov 3 - 11:59pm
You start with three sliders (Controls folder) resized and make the knob part invisible. It is best to display them in order from left to right: slider, slider2 then slider3. (Note: Make sure you add three sliders one at a time. DO NOT put one slider in and make a copy of it. Copied objects share items and may confuse you and your program.) Then put a mole (Amusement Park folder) centered on each slider (we will call them poles) at the bottom as in the picture. In the program, the mole will move up and down the pole to either the top of the pole or the bottom of the pole.
For each pole start with the mole at the bottom of the pole, or "all the way down". The start is as shown below (except the frogs should be invisible. See the note about their possible role below).
A three-word code is where each word is either the word "up" or "down". These words are to represent the position of the moles on the poles for the solution. You will randomly generate the three words (using random). This code is not shown in the game. For the moment, assume the code is "down up down".
Each mole is associated to be either up (on top of the pole) or down (at the bottom of the pole). If you click on a pole, its corresponding mole position should change. If the mole is up when you click on the pole, then the mole should move all the way down to the bottom of the pole. If the mole is down when you click on a pole, its mole is changed to be all the way up on the pole. For example, in the figure above, the game started with all the moles at the bottom of the poles (in the "down" position), then the result below is after one click: the second pole is clicked once (mole2 moves up), and then it matches the code of "down up down".
The game works as follows. You generate a three word code not equal to "down down down" (otherwise you would win right away) and not display the code. Then you click on the poles until their position matches the random code. A counter keeps track of how many times you have to click. The game ends when the moles on the poles match the three word random code. When the game ends the solution code should be displayed and something spectacular should happen to let you know the game is over.
Hint: To figure out if the mole is up or down on its pole, one way to do this is to put an invisible object in the middle of the pole and ask the question if the mole is above the object or not. In the first figure I have put frogs in the middle of the pole. They are not invisible so you can see them, but should be made invisible when the game is played as shown in the second figure.
Make sure that your moles and frogs have the correct orientation, meaning if you tell them to go up, they go up towards the sky (and NOT to the right or down...). They should all be facing the same direction.
Hint2: You probably want to use three code words. You may want to check something like "If mole1 is in the up position and the code1 is up, then mole1 matches its corresponding word code."
You must also indicate if the user lost (clicked five or more times). In this case, just a losing message is fine.
Implement your design and create an Alice world. Be sure your animation has all the requirements listed above. Be sure to include comments in your code.
This part will be turned in two ways.
You could load the two files OR place them in a folder, zip the folder with the two files and turn in the .zip file.