{"id":509422,"student_id":1444,"content":"var active = false; //是否活躍\nvar clock = 0; //計數器\nvar grid = []; //存放細胞狀態\n\n//初始化二維陣列\nfor (var x = -1; x \u003c 32; x++) {\n grid[x] = [];\n for (var y = -1; y \u003c 24; y++) {\n grid[x][y] = false;\n // grid[x][y] = Math.random() \u003e 0.5; //隨機產生細胞\n }\n}\n\n//點擊格子設定顏色\non('click', function () {\n var x = Math.floor(cursor.x/20);\n var y = Math.floor(cursor.y/20);\n grid[x][y] = !grid[x][y];\n});\n\n//「按一次」空白鍵更新一回合\n//「按住」空白按鍵不斷更新回合\non('keydown', 'space', update);\n\n//將二維陣列繪製在遊戲場景上\nforever(function () {\n \n});\n\n//更新細胞狀態\nfunction update () {\n \n};\n\n//計算 x, y 格子周圍存活的細胞個數\nfunction countCells (x, y) {\n \n}\n","created_at":"2023-03-18T16:57:44.132+08:00","updated_at":"2023-03-18T16:57:44.132+08:00","name":"生命遊戲(預設版) 副本","language":"javascript","screenshot":{"url":null},"parent_id":183396,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":54,"hashid":"6rps2j8qr","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":11591967,"file_name":"earth.png","project_id":509422,"asset_id":251690,"created_at":"2023-03-18T16:57:44.139+08:00","updated_at":"2023-03-18T16:57:44.139+08:00"},{"id":11591968,"file_name":"space_bg.jpg","project_id":509422,"asset_id":251691,"created_at":"2023-03-18T16:57:44.141+08:00","updated_at":"2023-03-18T16:57:44.141+08:00"},{"id":11591969,"file_name":"koding.png","project_id":509422,"asset_id":251692,"created_at":"2023-03-18T16:57:44.143+08:00","updated_at":"2023-03-18T16:57:44.143+08:00"},{"id":11591970,"file_name":"Gymnopedie_No_1.mp3","project_id":509422,"asset_id":251693,"created_at":"2023-03-18T16:57:44.146+08:00","updated_at":"2023-03-18T16:57:44.146+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦