{"id":20143,"student_id":173,"content":"setBackdrop(\"black\");\r\nvar score = 0;\r\nvar herats = 10;\r\nvar input = \"\";\r\n\r\nvar wordss = [\"coding\",\"fun\",\"hello\",\"school\",\"a\",\"b\",]\r\n\r\nvar words = []\r\nsetInterval(function () {\r\n var word = {\r\n text:wordss[Math.floor(Math.random()*wordss.length)],\r\n x: 0,\r\n y: Math.random() * 460\r\n }\r\n words.push(word)\r\n}, 1000)\r\n\r\n\r\nforever(function () {\r\n \r\n for (var i = 0; i \u003c words.length; i++) {\r\n var word = words[i]\r\n if (word.x \u003c 200) {\r\n print(word.text, word.x, word.y, \"green\")\r\n } else if (word.x \u003c 400) {\r\n print(word.text, word.x, word.y, \"yellow\")\r\n } else {\r\n print(word.text, word.x, word.y, \"red\")\r\n\r\n \r\n }\r\n if (word.text==input) {\r\n score++;\r\n words.splice(i, 1);\r\n input = \"\"\r\n }\r\n word.x++\r\n if (word.x \u003e 640) {\r\n herats--\r\n words.splice(i, 1)\r\n }\r\n }\r\n print(\"Score:\" + score, 10, 10, \"white\", 20)\r\n print(\"Hearts:\" + herats, 10, 40, \"white\", 20)\r\n print(input,480,10,\"white\",20)\r\n if(herats\u003c1){\r\n print(\"Game Over\",160,200,\"white\",64)\r\n stop()\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\",\"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})","created_at":"2018-01-13T17:03:09.230+08:00","updated_at":"2019-11-12T11:10:12.709+08:00","name":"鍵盤快打","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/20143/0b00990c27fd529c09b764c713578b2f.jpg"},"parent_id":10743,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":120,"hashid":"wdks5w6m","is_content_changed":false,"review_status":"pending","submitted_at":"2018-01-15T20:29:26.412+08:00","reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦