{"id":800231,"student_id":10,"content":"from game import *\nfrom random import *\n\nnums = [f'{i}.png' for i in range(10)]\nbg = create_sprite('bg.png', 'bg_successful.png', 'bg_failed.png')\nplayer = create_sprite('player.png')\nn1 = create_sprite(nums)\nn2 = create_sprite(nums)\nn3 = create_sprite(nums)\nn4 = create_sprite(nums)\n\nplayer.scale = 1.333\n\nn1.move_to(40, 50)\nn2.move_to(90, 50)\nn3.move_to(140, 50)\nn4.move_to(190, 50)\n\nscore_table = [5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0]\nspeed_table = [5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8]\nhidden_table = [True] * 11\n\nitems = []\nresults = []\nscale = 1\nscore = 0\n\nfor i in range(11):\n s = create_sprite(f's_{i}.png')\n items.append(s)\n s = create_sprite(f'l_{i}.png')\n results.append(s)\n \ndef reset():\n global scale, score, hidden_table\n \n scale = 1 + score / 100\n \n if bg.costume_id == 2: score = 0\n bg.costume_id = 0\n \n player.hidden = False\n player.move_to(600, 675 - 200)\n \n for s in items:\n s.hidden = False\n s.x = random() * 1200\n s.y = random() * -2700\n \n for i in range(11):\n speed_table[i] = random() * 5 * scale + 3\n hidden_table[i] = True\n results[i].hidden = True\n\ndef loop():\n update_player()\n update_items()\n update_score()\n\ndef update_player():\n if key.right: player.x += 15 * scale\n if key.left: player.x -= 15 * scale\n if key.space and bg.costume_id != 0: reset()\n\ndef update_items():\n global score\n is_pass = True\n for i in range(10):\n s = items[i]\n s.y += speed_table[i]\n s.direction += 1\n if s.y \u003c 1000: is_pass = False\n if abs(player.x - s.x) \u003c 100 and s.y \u003e player.y and s.y \u003c player.y + 50 and not s.hidden:\n s.hidden = True\n hidden_table[i] = False\n score += score_table[i]\n if is_pass: show_result()\n\ndef show_result():\n player.hidden = True\n for i in range(11):\n results[i].hidden = hidden_table[i]\n\n if hidden_table[8] and hidden_table[9] and hidden_table[10] and not hidden_table[0]:\n bg.costume_id = 1\n else:\n bg.costume_id = 2\n \ndef update_score():\n n1.costume_id = (score // 1000) % 10\n n2.costume_id = (score // 100) % 10\n n3.costume_id = (score // 10) % 10\n n4.costume_id = (score // 1) % 10\n\nforever(loop)\nreset()\n","created_at":"2024-07-22T17:40:29.856+08:00","updated_at":"2024-10-21T11:06:43.966+08:00","name":"拉麵配料王_完整版","language":"python","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/800231/d7f72eb85f77b49e3fb4f79f33aa33bb.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":46,"hashid":"yeys4q2n5","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":17730952,"file_name":"l_0.png","project_id":800231,"asset_id":758261,"created_at":"2024-07-22T17:41:36.153+08:00","updated_at":"2024-07-22T17:41:36.153+08:00"},{"id":17730939,"file_name":"2.png","project_id":800231,"asset_id":758248,"created_at":"2024-07-22T17:41:31.336+08:00","updated_at":"2024-07-22T17:41:31.336+08:00"},{"id":17730940,"file_name":"3.png","project_id":800231,"asset_id":758249,"created_at":"2024-07-22T17:41:31.338+08:00","updated_at":"2024-07-22T17:41:31.338+08:00"},{"id":17730959,"file_name":"l_7.png","project_id":800231,"asset_id":758268,"created_at":"2024-07-22T17:41:37.963+08:00","updated_at":"2024-07-22T17:41:37.963+08:00"},{"id":17730960,"file_name":"l_8.png","project_id":800231,"asset_id":758269,"created_at":"2024-07-22T17:41:37.965+08:00","updated_at":"2024-07-22T17:41:37.965+08:00"},{"id":17730971,"file_name":"s_7.png","project_id":800231,"asset_id":758280,"created_at":"2024-07-22T17:41:40.478+08:00","updated_at":"2024-07-22T17:41:40.478+08:00"},{"id":17730972,"file_name":"s_8.png","project_id":800231,"asset_id":758281,"created_at":"2024-07-22T17:41:40.480+08:00","updated_at":"2024-07-22T17:41:40.480+08:00"},{"id":17730973,"file_name":"s_9.png","project_id":800231,"asset_id":758282,"created_at":"2024-07-22T17:41:40.889+08:00","updated_at":"2024-07-22T17:41:40.889+08:00"},{"id":17730974,"file_name":"s_10.png","project_id":800231,"asset_id":758283,"created_at":"2024-07-22T17:41:40.891+08:00","updated_at":"2024-07-22T17:41:40.891+08:00"},{"id":17734818,"file_name":"bg_failed.png","project_id":800231,"asset_id":758356,"created_at":"2024-07-23T14:30:44.936+08:00","updated_at":"2024-07-23T14:30:44.936+08:00"},{"id":17734819,"file_name":"bg_successful.png","project_id":800231,"asset_id":758357,"created_at":"2024-07-23T14:30:44.937+08:00","updated_at":"2024-07-23T14:30:44.937+08:00"},{"id":17730945,"file_name":"8.png","project_id":800231,"asset_id":758254,"created_at":"2024-07-22T17:41:32.413+08:00","updated_at":"2024-07-22T17:41:32.413+08:00"},{"id":17730946,"file_name":"9.png","project_id":800231,"asset_id":758255,"created_at":"2024-07-22T17:41:32.415+08:00","updated_at":"2024-07-22T17:41:32.415+08:00"},{"id":17730941,"file_name":"4.png","project_id":800231,"asset_id":758250,"created_at":"2024-07-22T17:41:31.691+08:00","updated_at":"2024-07-22T17:41:31.691+08:00"},{"id":17730942,"file_name":"5.png","project_id":800231,"asset_id":758251,"created_at":"2024-07-22T17:41:31.693+08:00","updated_at":"2024-07-22T17:41:31.693+08:00"},{"id":17730963,"file_name":"player.png","project_id":800231,"asset_id":758272,"created_at":"2024-07-22T17:41:38.831+08:00","updated_at":"2024-07-22T17:41:38.831+08:00"},{"id":17730964,"file_name":"s_0.png","project_id":800231,"asset_id":758273,"created_at":"2024-07-22T17:41:38.832+08:00","updated_at":"2024-07-22T17:41:38.832+08:00"},{"id":17730955,"file_name":"l_3.png","project_id":800231,"asset_id":758264,"created_at":"2024-07-22T17:41:37.095+08:00","updated_at":"2024-07-22T17:41:37.095+08:00"},{"id":17730956,"file_name":"l_4.png","project_id":800231,"asset_id":758265,"created_at":"2024-07-22T17:41:37.097+08:00","updated_at":"2024-07-22T17:41:37.097+08:00"},{"id":17730957,"file_name":"l_5.png","project_id":800231,"asset_id":758266,"created_at":"2024-07-22T17:41:37.539+08:00","updated_at":"2024-07-22T17:41:37.539+08:00"},{"id":17730958,"file_name":"l_6.png","project_id":800231,"asset_id":758267,"created_at":"2024-07-22T17:41:37.540+08:00","updated_at":"2024-07-22T17:41:37.540+08:00"},{"id":17730961,"file_name":"l_9.png","project_id":800231,"asset_id":758270,"created_at":"2024-07-22T17:41:38.393+08:00","updated_at":"2024-07-22T17:41:38.393+08:00"},{"id":17730962,"file_name":"l_10.png","project_id":800231,"asset_id":758271,"created_at":"2024-07-22T17:41:38.395+08:00","updated_at":"2024-07-22T17:41:38.395+08:00"},{"id":17730937,"file_name":"0.png","project_id":800231,"asset_id":758246,"created_at":"2024-07-22T17:41:30.988+08:00","updated_at":"2024-07-22T17:41:30.988+08:00"},{"id":17730938,"file_name":"1.png","project_id":800231,"asset_id":758247,"created_at":"2024-07-22T17:41:30.989+08:00","updated_at":"2024-07-22T17:41:30.989+08:00"},{"id":17730947,"file_name":"all1.png","project_id":800231,"asset_id":758256,"created_at":"2024-07-22T17:41:34.040+08:00","updated_at":"2024-07-22T17:41:34.040+08:00"},{"id":17730948,"file_name":"all2.png","project_id":800231,"asset_id":758257,"created_at":"2024-07-22T17:41:34.041+08:00","updated_at":"2024-07-22T17:41:34.041+08:00"},{"id":17730949,"file_name":"bg.png","project_id":800231,"asset_id":758258,"created_at":"2024-07-22T17:41:34.900+08:00","updated_at":"2024-07-22T17:41:34.900+08:00"},{"id":17730950,"file_name":"bowl.png","project_id":800231,"asset_id":758259,"created_at":"2024-07-22T17:41:34.901+08:00","updated_at":"2024-07-22T17:41:34.901+08:00"},{"id":17730965,"file_name":"s_1.png","project_id":800231,"asset_id":758274,"created_at":"2024-07-22T17:41:39.214+08:00","updated_at":"2024-07-22T17:41:39.214+08:00"},{"id":17730966,"file_name":"s_2.png","project_id":800231,"asset_id":758275,"created_at":"2024-07-22T17:41:39.215+08:00","updated_at":"2024-07-22T17:41:39.215+08:00"},{"id":17730967,"file_name":"s_3.png","project_id":800231,"asset_id":758276,"created_at":"2024-07-22T17:41:39.647+08:00","updated_at":"2024-07-22T17:41:39.647+08:00"},{"id":17730968,"file_name":"s_4.png","project_id":800231,"asset_id":758277,"created_at":"2024-07-22T17:41:39.649+08:00","updated_at":"2024-07-22T17:41:39.649+08:00"},{"id":17730969,"file_name":"s_5.png","project_id":800231,"asset_id":758278,"created_at":"2024-07-22T17:41:40.055+08:00","updated_at":"2024-07-22T17:41:40.055+08:00"},{"id":17730970,"file_name":"s_6.png","project_id":800231,"asset_id":758279,"created_at":"2024-07-22T17:41:40.057+08:00","updated_at":"2024-07-22T17:41:40.057+08:00"},{"id":17730953,"file_name":"l_1.png","project_id":800231,"asset_id":758262,"created_at":"2024-07-22T17:41:36.604+08:00","updated_at":"2024-07-22T17:41:36.604+08:00"},{"id":17730954,"file_name":"l_2.png","project_id":800231,"asset_id":758263,"created_at":"2024-07-22T17:41:36.606+08:00","updated_at":"2024-07-22T17:41:36.606+08:00"},{"id":17730943,"file_name":"6.png","project_id":800231,"asset_id":758252,"created_at":"2024-07-22T17:41:32.047+08:00","updated_at":"2024-07-22T17:41:32.047+08:00"},{"id":17730944,"file_name":"7.png","project_id":800231,"asset_id":758253,"created_at":"2024-07-22T17:41:32.049+08:00","updated_at":"2024-07-22T17:41:32.049+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦