{"id":776833,"student_id":10,"content":"from game import *\nfrom random import *\n\nplayer = create_sprite('player.png')\nitems = []\nresults = []\ncostume_ids = [0, 0, 1, 1, 1, 2, 3, 4, 5, 6, 7]\nscoreTable = [10, 30, 15, 20, 20, 20, -100, -100]\nscore = 0\n\nfor i in range(7):\n s = create_sprite(str(i) + 'png')\n s.move_to(50 + i * 20, 50)\n results.append(s)\n\nfor i in range(11):\n s = create_sprite('0.png', '1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png')\n s.x = random() * 1000 + 100\n s.y = random() * 800\n s.costume_id = costume_ids[i]\n items.append(s)\n \ndef reset():\n for s in items:\n s.x = random() * 1000 + 100\n s.y = random() * 800 - 1000\n for s in results:\n s.hidden = True\n s.costume_id = 0\n\ndef loop():\n if key.right: player.x += 5\n if key.left: player.x -= 5\n if key.r: reset()\n \n top = items[0].y\n for s in items:\n s.y += 5\n if s.touched(player):\n s.hidden = True\n \n if s.costume_id == 0 and results[0].hidden == False:\n results[0].costume_id += 1\n \n if s.costume_id == 1 and results[1].hidden == False:\n results[0].costume_id += 1\n \n results[s.costume_id].hidden = False\n score += scoreTable[s.costume_id]\n \n if s.y \u003c top: top = s.y\n \n if top \u003e 1000 and a.x \u003c= 50:\n for s in results:\n s.x *= 3\n s.y *= 3\n s.scale *= 3\n \n if results[0].costume_id == 1 or results[6].hidden == False or results[6].hidden == False:\n stop()\n\nforever(loop)\nreset()\n\n","created_at":"2024-06-26T11:24:36.293+08:00","updated_at":"2024-06-26T15:24:56.866+08:00","name":"製作拉麵","language":"python","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/776833/29c8ca25898dc066ab36a73ac9fd134f.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":38,"hashid":"jzms9q2pe","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":17313825,"file_name":"3.png","project_id":776833,"asset_id":750576,"created_at":"2024-06-26T11:25:27.078+08:00","updated_at":"2024-06-26T11:25:27.078+08:00"},{"id":17313826,"file_name":"2.png","project_id":776833,"asset_id":750577,"created_at":"2024-06-26T11:25:27.080+08:00","updated_at":"2024-06-26T11:25:27.080+08:00"},{"id":17313829,"file_name":"player.png","project_id":776833,"asset_id":750580,"created_at":"2024-06-26T11:25:42.419+08:00","updated_at":"2024-06-26T11:25:42.419+08:00"},{"id":17313821,"file_name":"4.png","project_id":776833,"asset_id":750572,"created_at":"2024-06-26T11:25:26.512+08:00","updated_at":"2024-06-26T11:25:26.512+08:00"},{"id":17313822,"file_name":"7.png","project_id":776833,"asset_id":750573,"created_at":"2024-06-26T11:25:26.514+08:00","updated_at":"2024-06-26T11:25:26.514+08:00"},{"id":17313827,"file_name":"1.png","project_id":776833,"asset_id":750578,"created_at":"2024-06-26T11:25:27.295+08:00","updated_at":"2024-06-26T11:25:27.295+08:00"},{"id":17313828,"file_name":"0.png","project_id":776833,"asset_id":750579,"created_at":"2024-06-26T11:25:27.297+08:00","updated_at":"2024-06-26T11:25:27.297+08:00"},{"id":17313823,"file_name":"6.png","project_id":776833,"asset_id":750574,"created_at":"2024-06-26T11:25:26.779+08:00","updated_at":"2024-06-26T11:25:26.779+08:00"},{"id":17313824,"file_name":"5.png","project_id":776833,"asset_id":750575,"created_at":"2024-06-26T11:25:26.782+08:00","updated_at":"2024-06-26T11:25:26.782+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦