{"id":12431,"student_id":1407,"content":"setBackdrop(\"black\");\r\nvar score = 0;\r\nvar hearts = 100;\r\nvar flyingWords = [];\r\nvar words = [\"bed\", \"class\", \"always\", \"chicken\", \"koding\", \"pink\", \"power\", \"sing\", \"computer\", \"things\", \"school\", \"enter\", \"backspace\", \"shift\", \"white\", \"windows\", \"chin\", \"fun\", \"name\", \"bite\"];\r\nvar input = \"\";\r\nsetInterval( function(){\r\n var word = {\r\n test:words[Math.floor( Math.random()*20 )],\r\n x:0,\r\n y:Math.random()*480\r\n };\r\n flyingWords.push(word)\r\n}, 2000 );\r\nforever(function(){\r\n for(var i=0; i\u003cflyingWords.length; i++) {\r\n var word = flyingWords[i]\r\n if(word.x\u003c200) {\r\n print(word.test, word.x, word.y,\"green\")\r\n } else if(word.x\u003c400) {\r\n print(word.test, word.x, word.y,\"yellow\")\r\n } else {\r\n print(word.test, word.x, word.y,\"red\")\r\n }\r\n word.x+=0.3;\r\n if(word.test==input) {\r\n score++;\r\n flyingWords.splice(i,1)\r\n input = \"\";\r\n }\r\n if(word.x\u003e640) {\r\n hearts--;\r\n flyingWords.splice(i,1)\r\n }\r\n if(hearts\u003c=0) {\r\n print(\"gameover\",160,200,\"white\",64)\r\n stop();\r\n }\r\n }\r\n print(\"score:\"+ score,10,10,\"white\",20)\r\n print(\"hearts:\"+ hearts,10,30,\"white\",20)\r\n print(\"input:\"+ input,480,10,\"white\",20)\r\n \r\n});\r\n\r\nwhen(\"keydown\",\"a\",function() {\r\n input+=\"a\";\r\n} );\r\nwhen(\"keydown\",\"b\",function() {\r\n input+=\"b\";\r\n} );\r\nwhen(\"keydown\",\"c\",function() {\r\n input+=\"c\";\r\n} );\r\nwhen(\"keydown\",\"d\",function() {\r\n input+=\"d\";\r\n} );\r\nwhen(\"keydown\",\"e\",function() {\r\n input+=\"e\";\r\n} );\r\nwhen(\"keydown\",\"f\",function() {\r\n input+=\"f\";\r\n} );\r\nwhen(\"keydown\",\"g\",function() {\r\n input+=\"g\";\r\n} );\r\nwhen(\"keydown\",\"h\",function() {\r\n input+=\"h\";\r\n} );\r\nwhen(\"keydown\",\"i\",function() {\r\n input+=\"i\";\r\n} );\r\nwhen(\"keydown\",\"j\",function() {\r\n input+=\"j\";\r\n} );\r\nwhen(\"keydown\",\"k\",function() {\r\n input+=\"k\";\r\n} );\r\nwhen(\"keydown\",\"l\",function() {\r\n input+=\"l\";\r\n} );\r\nwhen(\"keydown\",\"m\",function() {\r\n input+=\"m\";\r\n} );\r\nwhen(\"keydown\",\"n\",function() {\r\n input+=\"n\";\r\n} );\r\nwhen(\"keydown\",\"o\",function() {\r\n input+=\"o\";\r\n} );\r\nwhen(\"keydown\",\"j\",function() {\r\n input+=\"j\";\r\n} );\r\nwhen(\"keydown\",\"p\",function() {\r\n input+=\"p\";\r\n} );\r\nwhen(\"keydown\",\"q\",function() {\r\n input+=\"q\";\r\n} );\r\nwhen(\"keydown\",\"r\",function() {\r\n input+=\"r\";\r\n} );\r\nwhen(\"keydown\",\"s\",function() {\r\n input+=\"s\";\r\n} );\r\nwhen(\"keydown\",\"t\",function() {\r\n input+=\"t\";\r\n} );\r\nwhen(\"keydown\",\"u\",function() {\r\n input+=\"u\";\r\n} );\r\nwhen(\"keydown\",\"v\",function() {\r\n input+=\"v\";\r\n} );\r\nwhen(\"keydown\",\"w\",function() {\r\n input+=\"w\";\r\n} );\r\nwhen(\"keydown\",\"x\",function() {\r\n input+=\"x\";\r\n} );\r\nwhen(\"keydown\",\"y\",function() {\r\n input+=\"y\";\r\n} );\r\nwhen(\"keydown\",\"z\",function() {\r\n input+=\"z\";\r\n} );\r\nwhen(\"keydown\",\"backspace\",function() {\r\n input = input.slice(0,-1);\r\n} );\r\n\r\n\r\n","created_at":"2017-09-06T00:11:39.889+08:00","updated_at":"2019-11-08T09:39:36.941+08:00","name":"鍵盤快打","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/12431/8be41f368290b5513003cb47349ede72.jpg"},"parent_id":10743,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":234,"hashid":"yeysvrge","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
到這台電腦