{
  "information": {
    "Title": "MultiplicationTables",
    "Author": [
      "MarinahToh",
      "lookang",
      "Geok Cheng"
    ],
    "AuthorLogo": [
      "./01authorlookang50x50.png",
      "",
      ""
    ],
    "Password": "",
    "Keywords": "",
    "Abstract": "",
    "Copyright": "",
    "Level": "",
    "Language": "",
    "Logo": [
      "./logo7.png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./01authorlookang50x50.png",
      "./logo7.png"
    ],
    "AuxiliaryFiles": [
      "./Unnamed3/",
      "./PenguinHat.png",
      "./iglooBigBlank.png",
      "./Artic.png",
      "./penguinplain.png",
      "./logo7.png"
    ],
    "HTMLHead": "<script \nasync=\"true\" src=\"https://www.googletagmanager.com/gtag/js?id=G-S9EWRY1CPJ\"></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n\n  gtag('config', 'G-S9EWRY1CPJ');\n</script>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": []
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "EditableVariables",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "numberofrounds",
              "Value": "6",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "numberofoption",
              "Value": "4",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "answerstringarray",
              "Value": "[[\"2\", \"1\", \"3\", \"4\"], [\"4\", \"5\", \"3\", \"2\"], [\"4\", \"5\", \"3\", \"6\"], [\"5\", \"4\", \"3\", \"2\"], [\"5\", \"4\", \"6\", \"3\"], [\"8\", \"9\", \"7\", \"6\"]]",
              "Type": "double",
              "Dimension": "[numberofoption][numberofrounds+1]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "catchanswerarray",
              "Value": "[\"5 - 3\", \"8 - 4\", \"9 - 5\", \"7 - 2\", \"6 - 1\", \"10 - 2\"]",
              "Type": "double",
              "Dimension": "[numberofoption][numberofrounds+1]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vx",
              "Value": "Math.max(Math.random(),0.3)",
              "Type": "double",
              "Dimension": "[numberofoption]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "backGroundImage",
              "Value": "\"./Unnamed3/Artic.png\"",
              "Type": "double",
              "Dimension": "",
              "Comment": "upload and replace file",
              "Domain": "public"
            },
            {
              "Name": "title",
              "Value": "\"Subtraction\"",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "catcherImage",
              "Value": "\"./iglooBigBlank.png\"",
              "Type": "double",
              "Dimension": "",
              "Comment": "upload and replace file",
              "Domain": ""
            },
            {
              "Name": "optionImage",
              "Value": "\"./penguinplain.png\"",
              "Type": "double",
              "Dimension": "",
              "Comment": "upload and replace file",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            }
          ]
        },
        {
          "Name": "Var Table",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "font",
              "Value": "\"\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "t",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dt",
              "Value": "0.05",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "n",
              "Value": "numberofoption",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "x",
              "Value": "2.8",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ymax",
              "Value": "6",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "y",
              "Value": "\"\"",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "[1,2.5,4,5.5]",
              "Domain": "public"
            },
            {
              "Name": "vy",
              "Value": "0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "Math.max(Math.random(),0.5)",
              "Domain": "public"
            },
            {
              "Name": "text",
              "Value": "[1,2,3,4]",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "textanswer",
              "Value": "",
              "Type": "String",
              "Dimension": "[n]",
              "Comment": "[\"took\",\"taked\",\"takes\",\"take\"]",
              "Domain": "public"
            },
            {
              "Name": "vocabaudio",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "a",
              "Value": "Math.round(Math.random()*10)",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "b",
              "Value": "Math.round(Math.random()*10)",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "c",
              "Value": "1",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "Var Table 2",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "xc",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "yc",
              "Value": "2.5",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "score",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "textcatch",
              "Value": "\"\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "\"take\"",
              "Domain": "public"
            },
            {
              "Name": "correct",
              "Value": "0",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "log",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "notrynumber",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "Questions",
          "Active": "false",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// Questions\nshuffleArray(multiplicationTable);\n\n\nanswerstringarray = [];\nfor (var i=0; i<numberofrounds; i++) {\n    const mult = multiplicationTable[i];\n    catchanswerarray[i] = mult;\n    answerstringarray[i] = possibleAnswers(mult);\n}\n"
        },
        {
          "Name": "shuffleArray(array)",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "textanswer = answerstringarray[0];\ntextcatch = catchanswerarray[0] // assign first word to catcher rabbit\n//numeric.linspace (start,stop,number)\ny = numeric.linspace(0,ymax,numberofoption) //using numeric library to arrange\n\n\nshuffleArray(y);\n//\nsetResponsiveFontSize()\n"
        },
        {
          "Name": "undefined",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (log==undefined){\n  log=\"\";\n  }"
        },
        {
          "Name": "messageSize",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (_isMobile){\n  //do nothing\n  }\n  \n  else{\n    // copy this into the initialization\n// make the font bigger\nvar fontSize = \"1vw\"\n_view.plottingPanel.getMessageDecoration(\"TL\").getFont().setFontSize(fontSize);\n_view.plottingPanel.getMessageDecoration(\"TR\").getFont().setFontSize(fontSize);\n_view.plottingPanel.getMessageDecoration(\"BL\").getFont().setFontSize(fontSize);\n_view.plottingPanel.getMessageDecoration(\"BR\").getFont().setFontSize(fontSize);\n\n//_view.plottingPanel.getMessageDecoration(\"TL\").getStyle().setFillColor(\"red\");\n    }"
        },
        {
          "Name": "picturesize",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "//orig_listener = _view.plottingPanel.getAxisX().panelChangeListener; _view.plottingPanel.getAxisX().panelChangeListener = function(e) { orig_listener(e); _view.backgroundsoccerfield.setSizeX(_view.plottingPanel.getRealWorldXMax()-_view.plottingPanel.getRealWorldXMin()); _view.backgroundsoccerfield.setSizeY(_view.plottingPanel.getRealWorldYMax()-_view.plottingPanel.getRealWorldYMin()); }"
        }
      ]
    },
    "evolution": {
      "information": {
        "FPS": "20",
        "SPD": "1",
        "RealTimeVariable": "",
        "Autoplay": "false"
      },
      "pages": [
        {
          "Name": "Evol Page",
          "Active": "true",
          "Internal": "false",
          "Type": "ODE_EDITOR",
          "Comment": "",
          "IndependentVariable": "t",
          "Increment": "dt",
          "Equations": [
            {
              "state": "x[i]",
              "rate": "-vx[i]"
            }
          ],
          "Method": "RungeKutta",
          "AbsoluteTolerance": "0.00001",
          "PreliminaryCode": {
            "Code": "",
            "Comment": "Code to be executed before rate equations are evaluated"
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": [
              {
                "Type": "EVENT_EDITOR",
                "Name": "collisioncorrect",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0",
                "StopAtEvent": "false",
                "ZeroCondition": "return Math.sqrt((x[0]-xc)*(x[0]-xc)+(y[0]-yc)*(y[0]-yc))-0.5;",
                "Action": "//alert();\nscore=score+2;\ncorrect = correct +1;\n_view.audio.play();\nlog = log+\"\\n\"+textcatch+\" = \"+textanswer[0]+\"\u2705\"; \nx[0]=3;\nx[1]=3;\nx[2]=3;\nx[3]=3;\nshuffleArray(y); \n//speech(\"correct\");\n//speech(textanswer[0]+\" is the past tense of \"+textcatch;\n\n// new code for \n Speechx = \"x\";\nvar textcatchSpeech = textcatch.split(Speechx).join('and');\nconsole.log(textcatch); // Output: \"Replace the string and with and and more and\"\nspeech(textanswer[0]+\" is the product of \"+textcatchSpeech);\n// end of new code\n\n//speech(textanswer[0]+\" is the product of \"+textcatch);\n//alert();\nif (correct==numberofrounds){ // game mechanism counter\n  _pause();\n  _tools.showOkDialog(\"Well Done\uff0cyour score is \"+score+\"/\"+2*numberofrounds+\" !\");\n  _view.audio1.play();\n  }\n  else{\ntextanswer=answerstringarray[correct]; //since correct is increase by 1, use this to change 4 options\ntextcatch=catchanswerarray[correct]; // change basket text as well\n} // game mechanism counter\nvyspeedchange ();\nnotrynumber=0;",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "miss",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "false",
                "ZeroCondition": "return x[0]-0;",
                "Action": "x[0] = 3;\nnotrynumber = notrynumber+1;\nif (notrynumber%4==0) {\nscore=score-0.5;\nlog = log+\"\\n\"+\"\u53e3\u53e3\"+textcatch+\"\u2753\";\n}",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "miss1",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "false",
                "ZeroCondition": "return x[1]-0;",
                "Action": "x[1] = 3;\nnotrynumber = notrynumber+1;\nif (notrynumber%4==0) {\nscore=score-0.5;\nlog = log+\"\\n\"+\"\u53e3\u53e3\"+textcatch+\"\u2753\";\n}",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "miss2",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "false",
                "ZeroCondition": "return x[2]-0;",
                "Action": "x[2] = 3;\nnotrynumber = notrynumber+1;\nif (notrynumber%4==0) {\nscore=score-0.5;\nlog = log+\"\\n\"+\"\u53e3\u53e3\"+textcatch+\"\u2753\";\n}",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "miss3",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "false",
                "ZeroCondition": "return x[3]-0;",
                "Action": "x[3] = 3;\nnotrynumber = notrynumber+1;\nif (notrynumber%4==0) {\nscore=score-0.5;\nlog = log+\"\\n\"+\"\u53e3\u53e3\"+textcatch+\"\u2753\";\n}",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "collisionwrong2",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0",
                "StopAtEvent": "false",
                "ZeroCondition": "return Math.sqrt((x[1]-xc)*(x[1]-xc)+(y[1]-yc)*(y[1]-yc))-0.25;",
                "Action": "//alert();\nscore=score-1;\nlog = log+\"\\n\"+textcatch+\" = \"+textanswer[1]+\"\u274c\";\nx[1]=3;\n//x[2]=3;\n//x[3]=3;",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "collisionwrong 3",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0",
                "StopAtEvent": "false",
                "ZeroCondition": "return Math.sqrt((x[2]-xc)*(x[2]-xc)+(y[2]-yc)*(y[2]-yc))-0.25;",
                "Action": "//alert();\nscore=score-1;\nlog = log+\"\\n\"+textcatch+\" = \"+textanswer[2]+\"\u274c\";\n//x[0]=3;\n//x[1]=3;\nx[2]=3;\n//x[3]=3;",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "collisionwrong 4",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0",
                "StopAtEvent": "false",
                "ZeroCondition": "return Math.sqrt((x[3]-xc)*(x[3]-xc)+(y[3]-yc)*(y[3]-yc))-0.25;",
                "Action": "//alert();\nscore=score-1;\nlog = log+\"\\n\"+textcatch+\" = \"+textanswer[3]+\"\u274c\";\n//x[0]=3;\n//x[1]=3;\n//x[2]=3;\nx[3]=3;\n",
                "Comment": ""
              }
            ]
          },
          "ZenoEffect": {
            "Code": "",
            "Comment": "",
            "StopAfterEffect": "true"
          },
          "AccelerationIndependentOfVelocity": "false",
          "ForceSynchronization": "false",
          "UseBestInterpolation": "false",
          "EstimateFirstStep": "false",
          "MemoryLength": "",
          "InternalStep": "",
          "MaximumStep": "",
          "MaximumNumberOfSteps": "10000",
          "RelativeTolerance": "",
          "DelayList": "",
          "DelayMaximum": "",
          "DelayAddDiscont": "",
          "DelayInitialCondition": {
            "Code": "",
            "Comment": ""
          },
          "DirectIncidenceMatrix": "",
          "Discontinuities": {
            "pages": []
          },
          "ErrorHandling": {
            "pages": []
          }
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "FixRel Page",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": ""
        }
      ]
    },
    "custom": {
      "pages": [
        {
          "Name": "shuffleArray(array)",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// in initialization\n// possible usage if x is the array\n//shuffleArray(x);\n\n\n//https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array\n/**\n * Randomize array element order in-place.\n * Using Durstenfeld shuffle algorithm.\n */\nfunction shuffleArray(array) {\n    for (var i = array.length - 1; i > 0; i--) {\n        var j = Math.floor(Math.random() * (i + 1));\n        var temp = array[i];\n        array[i] = array[j];\n        array[j] = temp;\n    }\n}"
        },
        {
          "Name": "speech",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// copy this custom function\n// in iOS need to add speech to the play button as On iOS the API works but must be triggered by a user action callback, like a response to a tap event, to provide a better experience to users and avoid unexpected sounds out of your phone\nfunction speech (option) {\n\n\n// allow code to run in Student Learning Space \nvar isCordova = (!!this.parent.cordova || !!window.cordova);\nif(isCordova) { // check it is running in Android or iOS\n        parent.TTS.speak({text:option,locale:'en-US'});\n\t// parent.TTS.speak({text:option,locale:'en-US'});\n} else {\n  var msg = new SpeechSynthesisUtterance(option);\n\n  //https://stackoverflow.com/questions/43983845/speechsynthesis-api-for-english-firefox\n  // Set the text.\n\t//msg.text = option; \n\t//https://forums.developer.apple.com/message/323564#323564\n\t// comment out the next 2 lines for english\n//msg.voice = speechSynthesis.getVoices().filter(function(voice) { return voice.name == 'Ting-Ting'; })[0];\nmsg.lang = 'en-US'; // need for android?\n\n//https://flaviocopes.com/speech-synthesis-api/\n//debug\n//console.log(`Voices #: ${speechSynthesis.getVoices().length}`)\n//speechSynthesis.getVoices().forEach(voice => {\n// console.log(voice.name, voice.lang)\n//})\n//debug\n\n// Queue this utterance.\nwindow.speechSynthesis.speak(msg);\n}\n\n}"
        },
        {
          "Name": "vyspeedchange",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "\nfunction vyspeedchange () {\n  for (var counter=0; counter<n  ; counter++) {\n  //vx[counter]=0.3;\n  vx[counter] = Math.max(Math.random(),0.3);\n}\n}"
        },
        {
          "Name": "setResponsiveFontSize",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function setResponsiveFontSize() {\n    // Get the viewport dimensions\n    var viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n    var viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n    var percent = 0.03\n    // Calculate the font size based on viewport width or height\n    var fontSize = Math.min(viewportWidth * percent, viewportHeight * percent); // Adjust the multiplier as needed\n\n    // Set the font size\n    font = \"normal normal \" + fontSize + \"px\"; // You can use px or other units as needed\n\n    // Apply the font size to your elements\n    // For example, you can apply it to a specific element with a class\n    //document.getElementById(\"yourElementId\").style.font = font;\n}"
        },
        {
          "Name": "AllQuestions",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// AllQuestions\n\nlet multiplicationTable = [\n  \"1x1\", \"1x2\", \"1x3\", \"1x4\", \"1x5\", \"1x6\", \"1x7\", \"1x8\", \"1x9\", \"1x10\",\n  \"2x1\", \"2x2\", \"2x3\", \"2x4\", \"2x5\", \"2x6\", \"2x7\", \"2x8\", \"2x9\", \"2x10\",\n  \"3x1\", \"3x2\", \"3x3\", \"3x4\", \"3x5\", \"3x6\", \"3x7\", \"3x8\", \"3x9\", \"3x10\",\n  \"4x1\", \"4x2\", \"4x3\", \"4x4\", \"4x5\", \"4x6\", \"4x7\", \"4x8\", \"4x9\", \"4x10\",\n  \"5x1\", \"5x2\", \"5x3\", \"5x4\", \"5x5\", \"5x6\", \"5x7\", \"5x8\", \"5x9\", \"5x10\",\n  \"6x1\", \"6x2\", \"6x3\", \"6x4\", \"6x5\", \"6x6\", \"6x7\", \"6x8\", \"6x9\", \"6x10\",\n  \"7x1\", \"7x2\", \"7x3\", \"7x4\", \"7x5\", \"7x6\", \"7x7\", \"7x8\", \"7x9\", \"7x10\",\n  \"8x1\", \"8x2\", \"8x3\", \"8x4\", \"8x5\", \"8x6\", \"8x7\", \"8x8\", \"8x9\", \"8x10\",\n  \"9x1\", \"9x2\", \"9x3\", \"9x4\", \"9x5\", \"9x6\", \"9x7\", \"9x8\", \"9x9\", \"9x10\",\n  \"10x1\", \"10x2\", \"10x3\", \"10x4\", \"10x5\", \"10x6\", \"10x7\", \"10x8\", \"10x9\", \"10x10\"\n];\n\n\nfunction possibleAnswers(multiplication) {\n  const numbers = multiplication.match(/\\d+/g).map(Number);\n  const x = numbers[0], y = numbers[1];\n  //_println(\"multi = \"+multiplication);\n  //_println(\"X=\"+x+ \". y = \"+y);\n  var biggest = parseInt(x+\"\"+y);\n  if (biggest>100) biggest = x*y + 1;\n  return [ \"\"+(x*y), \"\"+(x+y), \"\"+ Math.max(x,y)-Math.min(x,y), \"\"+biggest ]; \n} "
        }
      ]
    },
    "elements": {
      "list": [
        {
          "Classname": "org.colos.ejss.model_elements.numerics.NumericJavascriptElement",
          "Name": "numericJS"
        }
      ]
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "singlePlotPanel",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [],
        "Children": [
          {
            "Name": "labelNQ",
            "Type": "Label",
            "Properties": [
              {
                "name": "Text",
                "value": "\"Questions:\""
              },
              {
                "name": "Display",
                "value": "\"none\""
              }
            ]
          },
          {
            "Name": "parsedField",
            "Type": "ParsedField",
            "Properties": [
              {
                "name": "Format",
                "value": "\"0.\""
              },
              {
                "name": "Value",
                "value": "numberofrounds"
              },
              {
                "name": "Editable",
                "value": "_isPaused"
              },
              {
                "name": "OnChange",
                "value": "%_initialize%"
              },
              {
                "name": "Height",
                "value": "30"
              },
              {
                "name": "Width",
                "value": "50"
              },
              {
                "name": "Font",
                "value": "\"normal normal medium Arial, Helvetica, sans-serif\""
              },
              {
                "name": "Display",
                "value": "\"none\""
              }
            ]
          },
          {
            "Name": "title",
            "Type": "Label",
            "Properties": [
              {
                "name": "Text",
                "value": "%title%"
              },
              {
                "name": "Font",
                "value": "%font%"
              }
            ]
          },
          {
            "Name": "executionPanel",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Font",
                "value": "%font%"
              },
              {
                "name": "Display",
                "value": "\"inline-block\""
              }
            ],
            "Children": [
              {
                "Name": "runPauseButton",
                "Type": "TwoStateButton",
                "Properties": [
                  {
                    "name": "OffClick",
                    "value": "%_pause%"
                  },
                  {
                    "name": "TextOn",
                    "value": "\"Play\u25b6\""
                  },
                  {
                    "name": "State",
                    "value": "_isPaused"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Play/Pause\""
                  },
                  {
                    "name": "TextOff",
                    "value": "\"Pause\u275a\u275a\""
                  },
                  {
                    "name": "OnClick",
                    "value": "_play();\n//speech(\"\u73a9\"); \n"
                  }
                ]
              },
              {
                "Name": "stepButton",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Step\""
                  },
                  {
                    "name": "Text",
                    "value": "\"Step|\u25ba\""
                  },
                  {
                    "name": "OnClick",
                    "value": "%_step%"
                  }
                ]
              },
              {
                "Name": "initButton",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Initialize\""
                  },
                  {
                    "name": "OnClick",
                    "value": "%_initialize%"
                  },
                  {
                    "name": "Display",
                    "value": "\"none\""
                  }
                ]
              },
              {
                "Name": "resetButton",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Reset\""
                  },
                  {
                    "name": "Text",
                    "value": "\"Reset\u21bb\""
                  },
                  {
                    "name": "OnClick",
                    "value": "%_reset%"
                  }
                ]
              },
              {
                "Name": "button",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"button\""
                  },
                  {
                    "name": "OnClick",
                    "value": "let x = \"x\";\nvar textcatchSpeech = textcatch.split(x).join('and');\nconsole.log(textcatch); // Output: \"Replace the string and with and and more and\"\n\nspeech(textanswer[0]+\" is the product of \"+textcatchSpeech);"
                  },
                  {
                    "name": "Display",
                    "value": "\"none\""
                  }
                ]
              },
              {
                "Name": "labelTime",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"Time (s) : \""
                  }
                ]
              },
              {
                "Name": "timeField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.\""
                  },
                  {
                    "name": "Value",
                    "value": "t"
                  },
                  {
                    "name": "Editable",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "30"
                  },
                  {
                    "name": "Width",
                    "value": "50"
                  },
                  {
                    "name": "Font",
                    "value": "\"normal normal medium Arial, Helvetica, sans-serif\""
                  }
                ]
              }
            ]
          },
          {
            "Name": "plottingPanel",
            "Type": "PlottingPanel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Gutters",
                "value": "[0,0,0,0]"
              },
              {
                "name": "XFixedTick",
                "value": "0"
              },
              {
                "name": "Enabled",
                "value": "true"
              },
              {
                "name": "MaximumY",
                "value": "6"
              },
              {
                "name": "MaximumX",
                "value": "3.5"
              },
              {
                "name": "YFixedTick",
                "value": "0"
              },
              {
                "name": "TRMessage",
                "value": "\"Total Score=\"+score+\"/\"+2*numberofrounds+\"\\n\"+log "
              },
              {
                "name": "YAutoTicks",
                "value": "false"
              },
              {
                "name": "GridYShow",
                "value": "true"
              },
              {
                "name": "MinimumX",
                "value": "-0.5"
              },
              {
                "name": "MinimumY",
                "value": "0"
              },
              {
                "name": "XTickStep",
                "value": "1"
              },
              {
                "name": "MarginY",
                "value": "20"
              },
              {
                "name": "XAutoTicks",
                "value": "false"
              },
              {
                "name": "Height",
                "value": "\"\"+window.innerHeight*0.9"
              },
              {
                "name": "GridXShow",
                "value": "true"
              },
              {
                "name": "Width",
                "value": "\"100%\""
              },
              {
                "name": "TLMessage",
                "value": "\"Score = \"+score"
              },
              {
                "name": "BRMessage",
                "value": "\"Not attempted = \"+notrynumber"
              }
            ],
            "Children": [
              {
                "Name": "background",
                "Type": "Image2D",
                "Properties": [
                  {
                    "name": "SizeX",
                    "value": "4"
                  },
                  {
                    "name": "X",
                    "value": "1.5"
                  },
                  {
                    "name": "ImageUrl",
                    "value": "\"./Artic.png\""
                  },
                  {
                    "name": "Y",
                    "value": "2.5"
                  },
                  {
                    "name": "SizeY",
                    "value": "ymax*(1.2+0.2)"
                  }
                ]
              },
              {
                "Name": "imageSet",
                "Type": "ImageSet2D",
                "Properties": [
                  {
                    "name": "NumberOfElements",
                    "value": "numberofoption"
                  },
                  {
                    "name": "SizeX",
                    "value": "150"
                  },
                  {
                    "name": "X",
                    "value": "x"
                  },
                  {
                    "name": "Y",
                    "value": "y"
                  },
                  {
                    "name": "ImageUrl",
                    "value": "optionImage"
                  },
                  {
                    "name": "SizeY",
                    "value": "150"
                  },
                  {
                    "name": "PixelSize",
                    "value": "true"
                  }
                ]
              },
              {
                "Name": "group",
                "Type": "Group2D",
                "Expanded": "true",
                "Properties": [],
                "Children": [
                  {
                    "Name": "offSetY",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Y",
                        "value": "-0.5"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "image",
                        "Type": "Image2D",
                        "Properties": [
                          {
                            "name": "Sensitivity",
                            "value": "0"
                          },
                          {
                            "name": "SizeX",
                            "value": "150"
                          },
                          {
                            "name": "X",
                            "value": "xc"
                          },
                          {
                            "name": "ImageUrl",
                            "value": "catcherImage"
                          },
                          {
                            "name": "Y",
                            "value": "yc"
                          },
                          {
                            "name": "SizeY",
                            "value": "150"
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_ANY\""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "backingforwords",
                    "Type": "Shape2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"White\""
                      },
                      {
                        "name": "SizeX",
                        "value": "0.7"
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"RECTANGLE\""
                      },
                      {
                        "name": "X",
                        "value": "xc"
                      },
                      {
                        "name": "Y",
                        "value": "yc"
                      },
                      {
                        "name": "SizeY",
                        "value": "0.6"
                      }
                    ]
                  },
                  {
                    "Name": "textcatch",
                    "Type": "Text2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"Black\""
                      },
                      {
                        "name": "Sensitivity",
                        "value": "50"
                      },
                      {
                        "name": "OutlineColor",
                        "value": "\"Blue\""
                      },
                      {
                        "name": "RelativePosition",
                        "value": "\"WEST\""
                      },
                      {
                        "name": "X",
                        "value": "xc"
                      },
                      {
                        "name": "Y",
                        "value": "yc"
                      },
                      {
                        "name": "Text",
                        "value": "%textcatch%"
                      },
                      {
                        "name": "Font",
                        "value": "\"normal bold 20px \\\"Comic Sans MS\\\", cursive, sans-serif\""
                      },
                      {
                        "name": "EnabledPosition",
                        "value": "\"ENABLED_ANY\""
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "offsetY",
                "Type": "Group2D",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Y",
                    "value": "-0.40"
                  }
                ],
                "Children": [
                  {
                    "Name": "answerstringarray",
                    "Type": "TextSet2D",
                    "Properties": [
                      {
                        "name": "NumberOfElements",
                        "value": "n"
                      },
                      {
                        "name": "FillColor",
                        "value": "\"Red\""
                      },
                      {
                        "name": "RelativePosition",
                        "value": "\"CENTERED\""
                      },
                      {
                        "name": "X",
                        "value": "x"
                      },
                      {
                        "name": "Y",
                        "value": "y"
                      },
                      {
                        "name": "Text",
                        "value": "%textanswer%"
                      },
                      {
                        "name": "OnPress",
                        "value": "speech(textanswer[vocabaudio]); "
                      },
                      {
                        "name": "Visibility",
                        "value": "true"
                      },
                      {
                        "name": "EnabledPosition",
                        "value": "\"ENABLED_NO_MOVE\""
                      },
                      {
                        "name": "Font",
                        "value": "\"normal bold larger Arial, Helvetica, sans-serif\""
                      },
                      {
                        "name": "ElementInteracted",
                        "value": "vocabaudio"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "audio",
            "Type": "Audio",
            "Properties": [
              {
                "name": "AudioUrl",
                "value": "\"./Unnamed3/Ding Sound Effect.m4a\""
              }
            ]
          },
          {
            "Name": "audio1",
            "Type": "Audio",
            "Properties": [
              {
                "name": "AudioUrl",
                "value": "\"./Unnamed3/SMALL_CROWD_APPLAUSE-Yannick_Lemieux-1268806408.mp3\""
              }
            ]
          },
          {
            "Name": "labelNQuestions",
            "Type": "Label",
            "Properties": [
              {
                "name": "Text",
                "value": "\"labelNQuestions\""
              },
              {
                "name": "Display",
                "value": "\"none\""
              }
            ]
          }
        ]
      }
    ],
    "RootProperties": []
  },
  "metadata": {
    "APP": "WebEJS",
    "CreatedWith": "WebEJS : The web version of Easy JavaScript Simulations",
    "MoreInfo": "WebEJS 1.1",
    "version": "https://www.um.es/fem/wikis/webejs/"
  }
}