{"id":210546,"student_id":10,"content":"","created_at":"2020-12-09T17:33:33.554+08:00","updated_at":"2020-12-09T18:33:27.957+08:00","name":"ooxx 作法之一","language":"javascript","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/210546/0167306742eb2f4670c65f054207e758.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})\n\nvar cells = []\n\nvar block_a = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_b = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_c = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_d = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_e = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_f = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_g = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_h = createSprite('blue.png', 'orange.png', 'red.png')\nvar block_i = createSprite('blue.png', 'orange.png', 'red.png')\n\nblock_a.moveTo(200, 200)\nblock_b.moveTo(400, 200)\nblock_c.moveTo(600, 200)\n\nblock_d.moveTo(200, 400)\nblock_e.moveTo(400, 400)\nblock_f.moveTo(600, 400)\n\nblock_g.moveTo(200, 600)\nblock_h.moveTo(400, 600)\nblock_i.moveTo(600, 600)\n\nvar turn = 1;\n\nvar cells = [\n block_a, block_b, block_c,\n block_d, block_e, block_f,\n block_g, block_h, block_i\n]\n\n\nfor (var i=0; i\u003c9; i++) {\n let cell = cells[i]\n cell.on('click', function () {\n if (turn == 1) {\n cell.costumeId = turn\n turn = 2\n } else {\n cell.costumeId = turn\n turn = 1\n }\n })\n}\n\n\nforever(function(){\n \n var a = block_a.costumeId\n var b = block_b.costumeId\n var c = block_c.costumeId\n var d = block_d.costumeId\n var e = block_e.costumeId\n var f = block_f.costumeId\n var g = block_g.costumeId\n var h = block_h.costumeId\n var i = block_i.costumeId\n \n \n if (a == b \u0026\u0026 b == c \u0026\u0026 a != 0) {\n drawText('p' + a + '獲勝', 10, 10, 'black', 60)\n }\n if (d == e \u0026\u0026 e == f \u0026\u0026 d != 0) {\n drawText('p' + d + '獲勝', 10, 10, 'black', 60)\n }\n if (g == h \u0026\u0026 h == i \u0026\u0026 g != 0) {\n drawText('p' + g + '獲勝', 10, 10, 'black', 60)\n }\n if (a == d \u0026\u0026 d == g \u0026\u0026 a != 0) {\n drawText('p' + a + '獲勝', 10, 10, 'black', 60)\n }\n if (b == e \u0026\u0026 e == h \u0026\u0026 b != 0) {\n drawText('p' + b + '獲勝', 10, 10, 'black', 60)\n }\n if (c == f \u0026\u0026 f == i \u0026\u0026 c != 0) {\n drawText('p' + c + '獲勝', 10, 10, 'black', 60)\n }\n if (a == e \u0026\u0026 e == i \u0026\u0026 a != 0) {\n drawText('p' + a + '獲勝', 10, 10, 'black', 60)\n }\n if (c == e \u0026\u0026 e == g \u0026\u0026 c != 0) {\n drawText('p' + c + '獲勝', 10, 10, 'black', 60)\n }\n})\n\n\n","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":221,"hashid":"kdms66n3z","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3678867,"file_name":"red.png","project_id":210546,"asset_id":291523,"created_at":"2020-12-09T17:36:01.847+08:00","updated_at":"2020-12-09T17:36:01.847+08:00"},{"id":3678865,"file_name":"blue.png","project_id":210546,"asset_id":291521,"created_at":"2020-12-09T17:36:01.370+08:00","updated_at":"2020-12-09T17:36:01.370+08:00"},{"id":3678866,"file_name":"orange.png","project_id":210546,"asset_id":291522,"created_at":"2020-12-09T17:36:01.372+08:00","updated_at":"2020-12-09T17:36:01.372+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦