Compare Fractions Game

Construction Part of The Game

This chapter includes some information about building the game.Firstly, we construct a button which is button1 in the name of "Click To Change Fractions". As it is understood from its name, it provides us to change compared fractions. To change fractions when we click button1, we define 4 variables as a,b,c, and d all together in the same script. For that, we write codes on scripting part of button1 by clinking right and choosing properties tool on button1.And also, we write the codes on "On Clincking", because we want to change fractions when we clink the button1 simultaneously.Thanks to coding, we specify intervals of these variables. For example, we write codes of a=RandomBetween(1, b-1) and b=RandomBetween(2, 20) in this way. We repeat same procedure for c and d. After that, we write fractions on steps part which is next to tools. Then, as we drag the fractions on the page, they occur on the page, too. In addition, they change at the same time when we click the button1.[br]Now, we have two fractions as Fraction1 and Fraction2. We create three buttons for answers. For the button2, we select button tool then we give a name to caption as "Fraction1 < Fraction2".Then we write codes for button2 in Geogebra Script.[br]If(Fraction1<Fraction2, SetColor(button2,green))[br]If(Fraction1>Fraction2, SetColor(button2, red))[br]If(Fraction1==Fraction2, SetColor(button2, red))[br]We repeat same steps for button3 and button 4. [br]We write "Fraction1=Fraction2" on caption part by selecting button from tools .We write the codes on Geogebra Script for button3 are like below:[br]If(Fraction1==Fraction2, SetColor(button3, green))[br]If(Fraction1<Fraction2, SetColor(button3, red))[br]If(Fraction1>Fraction2, SetColor(button3, red))[br]We write "Fraction1>Fraction2" on caption part by selecting button from tools .We write the codes on Geogebra Script for button4 are like below:[br]If(Fraction1>Fraction2, SetColor(button4, green))[br]If(Fraction1==Fraction2, SetColor(button4, red))[br]If(Fraction1<Fraction2, SetColor(button4, red))[br]We aim with these codes to see green when players choose right answer and to see red when players choose wrong answer.And also we want to change the colors of buttons to black as fractions change when we clink the button 1,"Clink To Change Fractions". For that, we write codes on scripting part and on clinking of button1. Everytime, we click to see all button in black, we write codes below:[br]SetColor(button2, black)[br]SetColor(button3, black)[br]SetColor(button4, black)[br]Then, to make an explanation about the functions of buttons, we write a note from text tool.We write "Click the button you think it is right answer". Then, to make clear what is green or red on button, we add a picture from image tool giving feedback as green:right or red:wrong.[br][br][br][br][br][br]

Information