{"id":103932,"student_id":1885,"content":"setBackdrop(\"black\");\n var score=0;\n var hearts=10;\n var input=\"\";\n \n var words=[\"color\",\"duck\",\"apple\",\"floor\"] ;\n \n \n var flyingWords=[];\n setInterval(function(){\n var word={\n text:words[Math.floor(Math.random()*4)],\n x:0, \n y:Math.random()*480\n };\n flyingWords.push(word);\n },1000);\n \n \n\n\nforever(function(){\n for(var i=0;i\u003cflyingWords.length;i++){\n var word=flyingWords[i];\n if(word.x\u003c200){\n print(word.text,word.x,word.y,\"green\");\n }else if(word.x\u003c400){\n print(word.text,word.x,word.y,\"yellow\");\n }else{\n print(word.text,word.x,word.y,\"red\");\n }\n \n if(word.text==input){\n score++;\n flyingWords.splice(i,1);\n input=\"\";\n }\n \n \n word.x++;\n if(word.x\u003e640){\n hearts--;\n flyingWords.splice(i,1);\n }\n }\n print(\"Score:\"+score,10,10,\"white\",20);\n print(\"Hearts:\"+hearts,10,40,\"white\",20);\n print(input,480,10,\"white\",20);\n if(hearts\u003c=0){\n stop();\n print(\"Game over\",200,160,\"white\",64);\n }\n \n});\n\nwhen(\"keydown\",\"a\",function(){\n input=input+\"a\";\n});\nwhen(\"keydown\",\"b\",function(){\n input=input+\"b\";\n});\nwhen(\"keydown\",\"c\",function(){\n input=input+\"c\";\n});\nwhen(\"keydown\",\"d\",function(){\n input=input+\"d\";\n});\nwhen(\"keydown\",\"e\",function(){\n input=input+\"e\";\n});\nwhen(\"keydown\",\"f\",function(){\n input=input+\"f\";\n});\nwhen(\"keydown\",\"g\",function(){\n input=input+\"g\";\n});\nwhen(\"keydown\",\"h\",function(){\n input=input+\"h\";\n});\nwhen(\"keydown\",\"i\",function(){\n input=input+\"ia\";\n});\nwhen(\"keydown\",\"j\",function(){\n input=input+\"j\";\n});\nwhen(\"keydown\",\"k\",function(){\n input=input+\"k\";\n});\nwhen(\"keydown\",\"l\",function(){\n input=input+\"l\";\n});\nwhen(\"keydown\",\"m\",function(){\n input=input+\"m\";\n});\nwhen(\"keydown\",\"n\",function(){\n input=input+\"n\";\n});\nwhen(\"keydown\",\"o\",function(){\n input=input+\"o\";\n});\nwhen(\"keydown\",\"p\",function(){\n input=input+\"p\";\n});\nwhen(\"keydown\",\"q\",function(){\n input=input+\"q\";\n});\nwhen(\"keydown\",\"r\",function(){\n input=input+\"r\";\n});\nwhen(\"keydown\",\"s\",function(){\n input=input+\"s\";\n});\nwhen(\"keydown\",\"t\",function(){\n input=input+\"t\";\n});\nwhen(\"keydown\",\"u\",function(){\n input=input+\"u\";\n});\nwhen(\"keydown\",\"v\",function(){\n input=input+\"v\";\n});\nwhen(\"keydown\",\"w\",function(){\n input=input+\"w\";\n});\nwhen(\"keydown\",\"x\",function(){\n input=input+\"x\";\n});\nwhen(\"keydown\",\"y\",function(){\n input=input+\"y\";\n});\nwhen(\"keydown\",\"z\",function(){\n input=input+\"z\";\n});\nwhen(\"keydown\",\"backspace\",function(){\n input=input.slice(0,-1);\n});\n\n\n","created_at":"2019-11-02T10:15:56.482+08:00","updated_at":"2019-11-08T19:27:17.817+08:00","name":"鍵盤快打 副本","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/103932/be4b846576c180293ac3630a4b44bfb5.jpg"},"parent_id":10743,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":138,"hashid":"2pds4pjy","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦