{"id":5794,"student_id":1215,"content":"var happy01 = Math.random();\nconsole.log(happy01);\nhappy01 = happy01*6+1;\nhappy01 = Math.floor(happy01);\nconsole.log(\"骰子01的點數=\"+happy01);\n\n// 以上是產生1-6的亂數程式 1-6\n\nvar happy02 = Math.random();\nconsole.log(happy02);\nhappy02 = happy02*6+1;\nhappy02 = Math.floor(happy02);\nconsole.log(\"骰子02的點數=\"+happy02);\n\n// 以上是產生1-6的亂數程式 1-6\n\nvar happy03 = happy01+happy02;\nconsole.log(\"總點數=\"+happy03);\n\n\nconsole.log(\"骰子01的點數=\"+(happy01=Math.floor(Math.random()*6+1)));\nconsole.log(\"骰子02的點數=\"+(happy02=Math.floor(Math.random()*6+1)));\nconsole.log(\"總點數=\"+(happy03 = happy01 + happy02));\n","created_at":"2017-05-14T23:16:30.242+08:00","updated_at":"2019-10-24T21:49:35.864+08:00","name":"JS Game L4","language":"javascript","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/5794/c6064432b619f1285eb8468e3a2cac36.jpg"},"parent_id":4708,"plugin":"setBackdrop(\"#5ea642\");\nvar hero = createSprite(\"hero.png\");\nvar box = createSprite(\"console-box.png\");\nhero.scale = 0.2;\nbox.y=380;\n\nvar heroName = heroName || \"請輸入主角名稱\";\nvar heroHP = heroHP || 0;\nvar heroMP = heroMP || 0;\nvar heroStatus = heroStatus || \"\";\n\nvar originConsoleLog = console.log;\nvar logs = [];\nconsole.log = function(log){\n\tlogs.push(log);\n if(logs.length\u003e5){logs.shift();}\n originConsoleLog(log);\n};\n\nforever(function(){\n\tprint(heroName, 20, 20, \"white\", 18);\n\tprint(\"生命: \" + heroHP, 20, 48);\n\tprint(\"魔力: \" + heroMP, 20, 68);\n\tprint(\"狀態: \" + heroStatus, 20, 88);\n for(var i=logs.length-1;i\u003e=0;i--){\n\t print(logs[i], 64, 330+20*i, \"white\",14); \n }\n});","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":104,"hashid":"6rpsj2v","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":140331,"file_name":"hero.png","project_id":5794,"asset_id":15669,"created_at":"2017-05-31T10:57:54.208+08:00","updated_at":"2017-05-31T10:57:54.208+08:00"},{"id":140332,"file_name":"console-box.png","project_id":5794,"asset_id":15670,"created_at":"2017-05-31T10:57:54.214+08:00","updated_at":"2017-05-31T10:57:54.214+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦