{"id":781288,"student_id":10,"content":"from game import *\n\na = create_sprite('pie.png')\nb = create_sprite('pie.png')\nc = create_sprite('pie.png')\nd = create_sprite('pie.png')\na.direction = 0\nb.direction = 90\nc.direction = 180\nd.direction = 270\na.opacity = 0.5\nb.opacity = 0.5\nc.opacity = 0.5\nd.opacity = 0.5\n\nscore = 0\nstart = None\n\ndef loop():\n global score, start\n \n if cursor.is_down:\n if a.touched(cursor):\n a.opacity = 1\n if start == None: start = a\n if b.touched(cursor):\n b.opacity = 1\n if start == None: start = b\n if c.touched(cursor):\n c.opacity = 1\n if start == None: start = c\n if d.touched(cursor):\n d.opacity = 1\n if start == None: start = d\n else:\n start = None\n a.opacity = 0.5\n b.opacity = 0.5\n c.opacity = 0.5\n d.opacity = 0.5\n \n if a.opacity == 1 and b.opacity == 1 and c.opacity == 1 and d.opacity == 1 and start.touched(cursor):\n a.opacity = 0.5\n b.opacity = 0.5\n c.opacity = 0.5\n d.opacity = 0.5\n score += 1\n \n \n \n \n draw_text(score, 30, 30)\n \n\n\nforever(loop)","created_at":"2024-06-30T14:26:35.142+08:00","updated_at":"2024-06-30T16:04:44.911+08:00","name":"w","language":"python","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/781288/0dcc32cf8c1ea4ee7eaf618f3a42ece2.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":42,"hashid":"qmdsvkd4v","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":17404076,"file_name":"pie.png","project_id":781288,"asset_id":752003,"created_at":"2024-06-30T15:10:09.293+08:00","updated_at":"2024-06-30T15:10:09.293+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦