{"id":169749,"student_id":12205,"content":"setBackdrop(\"bg.jpg\");\nvar right = createSprite(\"success.png\");\nright.moveTo(280, 300);\nvar wrong = createSprite(\"error.png\");\nwrong.moveTo(360, 300);\nvar bomb = createSprite([\"bomb.png\",\"boom.png\"]);\nbomb.moveTo( 180, 60);\n\nvar score = 0;\nvar progressBar = 300;\n\ncreateQ();\n\nforever(function(){\n print(\"Score: \" + score,280,360,\"#FF5151\",25);\n if(progressBar \u003e 0){\n print(num1 + \" + \" + num2 + \" = \", 240, 120, \"#8d6e63\", 40);\n print(answer,300,180,\"#8d6e63\",40);\n }else{\n gameOver();\n }\n progressBar-=2;\n pen.fillColor = \"#FF5151\";\n pen.size = 0;\n pen.drawRect(200,60,progressBar, 10);\n});\n\nright.when(\"click\", function () {\n if(num1+num2 == answer){\n score += 1;\n createQ(); \n }else{\n isCorrect = false;\n gameOver();\n } \n});\n\nwrong.when(\"click\", function () {\n if(num1+num2 != answer){\n score += 1;\n createQ();\n }else{\n gameOver();\n }\n});\n\nfunction createQ(){\n num1 = Math.ceil(Math.random()*10);\n num2 = Math.ceil(Math.random()*10);\n if(Math.random() \u003c 0.3) {\n answer = num1 + num2;\n }else {\n answer = Math.floor(Math.random()*20);\n }\n progressBar = 300;\n}\n\nfunction gameOver(){\n print(\"Game Over\",190,120,\"#8d6e63\",50);\n print(\"Score: \" + score,280,360,\"#FF5151\",25);\n bomb.costumeId = 1;\n stop();\n}\n\n","created_at":"2020-07-23T15:17:09.343+08:00","updated_at":"2020-08-19T13:46:25.369+08:00","name":"算術炸彈","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/169749/89edcce60b8890776f43b51e69f48ea4.jpg"},"parent_id":9466,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[12205],"is_featured":false,"views":55,"hashid":"p93sgzpz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2932157,"file_name":"error.png","project_id":169749,"asset_id":25159,"created_at":"2020-07-23T15:17:09.349+08:00","updated_at":"2020-07-23T15:17:09.349+08:00"},{"id":2932158,"file_name":"success.png","project_id":169749,"asset_id":25160,"created_at":"2020-07-23T15:17:09.351+08:00","updated_at":"2020-07-23T15:17:09.351+08:00"},{"id":2932159,"file_name":"bg.jpg","project_id":169749,"asset_id":25161,"created_at":"2020-07-23T15:17:09.352+08:00","updated_at":"2020-07-23T15:17:09.352+08:00"},{"id":2932160,"file_name":"boom.png","project_id":169749,"asset_id":25162,"created_at":"2020-07-23T15:17:09.353+08:00","updated_at":"2020-07-23T15:17:09.353+08:00"},{"id":2932161,"file_name":"bomb.png","project_id":169749,"asset_id":25163,"created_at":"2020-07-23T15:17:09.354+08:00","updated_at":"2020-07-23T15:17:09.354+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦