{"id":12509,"student_id":10,"content":"setBackdrop(\"#ffffff\");\nvar COLORS = [\"Red\", \"Black\", \"Blue\", \"Green\", \"Orange\", \"Purple\"];\nvar position1 = createSprite(\"rectangle.jpg\");\nposition1.moveTo(190, 150);\nvar position2 = createSprite(\"rectangle.jpg\");\nposition2.moveTo(450, 150);\nvar position3 = createSprite(\"rectangle.jpg\");\nposition3.moveTo(190, 330);\nvar position4 = createSprite(\"rectangle.jpg\");\nposition4.moveTo(450, 330);\n\nvar progressBar = 640;\nvar level = 0;\nvar words = [];\nvar color = [];\n\nforever(function () {\n print(words[0], 120, 120, color[0], 45);\n print(words[1], 370, 120, color[1], 45);\n print(words[2], 120, 310, color[2], 45);\n print(words[3], 370, 310, color[3], 45);\n\n progressBar -= 1 + level*0.1;\n if (progressBar \u003c 0) {\n stop();\n }\n pen.fillColor = 'red';\n pen.drawRect(0, 0, progressBar, 30);\n print('level: ' + level, 10, 10, 'black', 30);\n});\n\nposition1.on('click', function () {\n choose(0);\n});\nposition2.on('click', function () {\n choose(1);\n});\nposition3.on('click', function () {\n choose(2);\n});\nposition4.on('click', function () {\n choose(3);\n});\n\nfunction choose (options) {\n if (color[options] == words[options]) {\n progressBar = 640;\n level++;\n colorPicker();\n } else {\n stop();\n }\n}\n\nfunction colorPicker () {\n color = [];\n words = [];\n for (var i=0; i\u003c4; i++) {\n\n var rand1 = Math.floor(Math.random()*COLORS.length);\n var rand2 = Math.floor(Math.random()*COLORS.length);\n\n while (rand1 == rand2) {\n rand2 = Math.floor(Math.random()*COLORS.length);\n }\n\n color.push(COLORS[rand1]);\n words.push(COLORS[rand2]);\n }\n\n var rand = Math.floor(Math.random()*4);\n words[rand] = color[rand];\n}\n\ncolorPicker();","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-02T08:33:51.244+08:00","name":"Color Stroop","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/12509/89edcce60b8890776f43b51e69f48ea4.jpg"},"parent_id":12462,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":480,"hashid":"wdks4996","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":265999,"file_name":"0.png","project_id":12509,"asset_id":6,"created_at":"2017-09-29T20:25:00.622+08:00","updated_at":"2017-09-29T20:25:00.622+08:00"},{"id":266000,"file_name":"2.png","project_id":12509,"asset_id":8,"created_at":"2017-09-29T20:25:00.624+08:00","updated_at":"2017-09-29T20:25:00.624+08:00"},{"id":266001,"file_name":"rectangle.jpg","project_id":12509,"asset_id":32423,"created_at":"2017-09-29T20:25:00.626+08:00","updated_at":"2017-09-29T20:25:00.626+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦