Telegram Game Bot: https://t.me/gamebot
Game location: https://tbot.xyz/math/
Use at your own discretion :)
Telegram Game Bot: https://t.me/gamebot
Game location: https://tbot.xyz/math/
Use at your own discretion :)
| function do_math() { | |
| var x = parseInt(document.getElementById("task_x").innerText); | |
| var y = parseInt(document.getElementById("task_y").innerText); | |
| var z = parseInt(document.getElementById("task_res").innerText); | |
| var op = document.getElementById("task_op").innerText; | |
| var Z; | |
| if (op === "+") | |
| Z = x + y; | |
| else if (op === "–") // Trap | |
| Z = x - y; | |
| else if (op === "×") // Trap | |
| Z = x * y; | |
| else if (op === "/") | |
| Z = x / y; | |
| else | |
| Z = 0; // Give up | |
| var score = parseInt(document.getElementById("score_value").innerText); | |
| if ((z === Z) ^ (score >= 1000)) | |
| document.getElementById("button_correct").click(); | |
| else | |
| document.getElementById("button_wrong").click(); | |
| } | |
| setInterval(do_math, 100); |
how to run it