{"id":9287,"student_id":70,"content":"setBackdrop(\"black\");\nvar score = 0;\nvar hearts = 10;\nvar input = \"\";\n\nvar words = [ \"coding\", \"fun\", \"hello\", \"school\"];\n\nvar flyingWords = [];\nsetInterval( function(){\n var word = {\n text: words[Math.floor( Math.random()*words.length )],\n x: 0,\n y: Math.random()*480\n };\n flyingWords.push(word);\n}, 1000 );\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 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 print(\"Game Over\",160,200,\"white\",64);\n stop();\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 + \"i\";\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});","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-02T07:04:02.410+08:00","name":"Typing Speed","language":"javascript","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/9287/89edcce60b8890776f43b51e69f48ea4.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":354,"hashid":"d5msvwvq","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦