Construction of the Game
Step 1: Let's Start
1. Insert an image for background. [br]2. Create a slider 'a' whose range is between 1 and 30. (For bases.)[br]3. Create two different sliders named 'a_1' and 'a_2'. The range of each slider is between 0 and 30. (For exponents.)[br]4. Create two different sliders named 'a_3' and 'a_4'. The range of each slider is between 1 and 1000. (For result.)[br]5. Create two input boxes named 't1' and 'MetinAlanı3' for each base, connect them to the slider 'a'.[br]6. Create an input box named 't2' for first exponent and connect it to the slider 'a_1'.[br]7. Create an input box named 't3' for second exponent and connect it to the slider 'a_2'.[br]8. Create an input box named 'ss1' for base of result and connect it to the slider 'a_3'.[br]9. Create an input box named 'ss2' for exponent of result and connect it to the slider 'a_4'.[br]10. Create text for multiplication sign between first and second bases.[br]11. Create text for equals sign between second base and base of result.[br]
Step 2:
1. Create a slider 'b' whose range is between 1 and 30. (For bases.)[br]2. Create two different sliders named 'b_1' and 'b_2'. The range of each slider is between 0 and 30. (For exponents.)[br]3. Create two different sliders named 'b_3' and 'b_4'. The range of slider 'b_3' is between 1 and 1000 and the range of slider 'b_4' is between -30 and 30. (For result.)[br]4. Create two input boxes named 'k1' and 'MetinAlanı4' for each base, connect them to the slider 'b'.[br]6. Create an input box named 'k2' for first exponent and connect it to the slider 'b_1'.[br]7. Create an input box named 'k3' for second exponent and connect it to the slider 'b_2'.[br]8. Create an input box named 'gg1' for base of result and connect it to the slider 'b_3'.[br]9. Create an input box named 'gg2' for exponent of result and connect it to the slider 'b_4'.[br]10. Create text for division sign between first and second bases.[br]11. Create text for equals sign between second base and base of result.
Step 3:
[b]For Multiplication:[/b][br]1. Construct a button and name it as 'change base'. The script is as follows in JavaScript:[br]number=Math.random()*30+1;[br]ggbApplet.setValue('a',Math.round(number)); [br][br]2. Construct a button and name it as 'change exponent 1'. The script is as follows in JavaScript:[br]number2=Math.random()*30+1;[br]ggbApplet.setValue('a_1',Math.round(number2));[br][br]3. Construct a button and name it as 'change exponent 2'. The script is as follows in JavaScript:[br]number3=Math.random()*30+1;[br]ggbApplet.setValue('a_2',Math.round(number3));[br][br][b]For Division:[/b][br]4. Construct a button and name it as 'change base'. The script is as follows in JavaScript:[br]number4=Math.random()*30+1;[br]ggbApplet.setValue('b',Math.round(number4));[br][br]5. Construct a button and name it as 'change exponent 1'. The script is as follows in JavaScript:[br]number5=Math.random()*30+1;[br]ggbApplet.setValue('b_1',Math.round(number5));[br][br]6. Construct a button and name it as 'change exponent 2'. The script is as follows in JavaScript:[br]number6=Math.random()*30+1;[br]ggbApplet.setValue('b_2',Math.round(number6));[br][br]7. Hide all of the sliders by clicking right on "Hide objects".[br]8. Change the colours of buttons.
Step 4:
[b]For Multiplication:[/b][br]1. Create a text named 'metin3'.[br]2. Create a button and name it as 'CHECK'. The script is as follows in JavaScript:[br][br]a = ggbApplet.getValue('a');[br]a1 = ggbApplet.getValue('a_1');[br]a2 = ggbApplet.getValue('a_2');[br][br]s1 = ggbApplet.getValue('a_3');[br]s2 = ggbApplet. getValue("a_4");[br][br]if(a*(a1+a2) != s1*s2){[br]ggbApplet.setTextValue("metin3", "WRONG");[br]}else{[br]if(s2 == 1){[br]ggbApplet.setTextValue("metin3", "1 POINT (IMPROVE YOUR SOLUTION)");[br]}[br]else if (s1 != a){[br]ggbApplet.setTextValue("metin3", "10 POINTS (YOU ARE PERFECT)");[br]}[br]else{[br]ggbApplet.setTextValue("metin3", "5 POINTS (YOU CAN DO BETTER THAN THIS)");[br]}[br]}[br][br][b]For Division:[br][/b]1. Create a text names 'metin5'[br]2. Create a button and name it as 'CHECK'. The script is as follows in JavaScript:[br][br]b = ggbApplet.getValue('b');[br]b1 = ggbApplet.getValue('b_1');[br]b2 = ggbApplet.getValue('b_2');[br][br]g1 = ggbApplet.getValue('b_3');[br]g2 = ggbApplet. getValue("b_4");[br][br]if(b*(b1-b2) != g1*g2){[br]ggbApplet.setTextValue("metin5", "WRONG");[br]}else{[br]if(g2 == 1){[br]ggbApplet.setTextValue("metin5", "1 POINT (IMPROVE YOUR SOLUTION)");[br]}[br]else{[br]ggbApplet.setTextValue("metin5", "10 POINTS (YOU ARE PERFECT)");[br]}[br]}[br]
Step 5:
1. Create a text which includes how to play the game.[br]2. Construct a check box and name its caption as 'HOW TO PLAY' and connect it to the text.
[b]HAVE FUN![/b]