Construction of the Game
1. Start with deciding edge points of coordinate plane.
ceil(x(Köşe[1])), floor(x(Köşe[3])),ceil(y(Köşe[3])) and floor(y(Köşe[3]))
2. Write the function (Rastgele[xmin,xmax],Rastgele[ymin,ymax]) which is assigned the hidden bananas. It creates the point A.
3. Create the point B clicking the point button, which presents the monkey donkey.
4. Create four buttons (up, down, right, left) for the movement of monkey. (later make the connections between buttons and monkey)
5.To calculate the number of required clicks, write the formula: abs(x(A)-x(B))+abs(y(A)-y(B)). So, you get the CA which represents the click number.
6. Choose the text box tool on page and write the command "Bananas are "+CA+" clicks away"
7. Choose the button tool to create button and named it "NEW". After finding bananas, to start the game again, you need to choose the "NEW" button.
8.To count your each movement, create step slider. Write 1 in the range part.
9. Create another slider (dst) to calculate the distance between bananas and monkey. Choose the CA for the value. Write 1 in the range part.
10. Form the text (yeahh!! Let's eat them..) for the banana finding moment. Write the command CA=0 in advanced part.
11.Create a text box and write the formula ""+steps+"steps to find bananas"+dst+"away there".
12. To connect buttons with monkey click on each button one by one and write the commands for left in Betikleme part in Tıklandığında;
1.DeğeriVer[B,(x(B)-1,y(B))]
2.DeğeriVer[steps,steps+1]
for right button
1. DeğeriVer[B,x(B)+1,y(B))]
2. DeğeriVer[steps,steps+1]
for up button
1. DeğeriVer[B,(x(B),y(B)+1)]
2. DeğeriVer[steps, steps+1]
for down button
1. DeğeriVer[B,(x(B),y(B)-1)]
2. DeğeriVer[steps,steps+1]
13. Save convenient images on your desktop. Drag and drop on the geogebra page. Click right on the picture and choose properties.
for hidden banana image
choose location button to edge 1 write A -(1,0) and edge 2 write A.
for monkey image
choose location button to edge 1write B and edge 2 B+(1,0).