{"id":162822,"student_id":2589,"content":"import game\n\ngame.set_backdrop(\"border.jpg\")\nend = game.create_sprite(\"e.png\")\ngrass = game.create_sprite(\"grass.png\")\ncar1 = game.create_sprite(\"car_red.png\")\ncar2 = game.create_sprite(\"car_blue.png\")\n\nend.direction = 0\nend.y = 40\nend.x = 450\ncar1.direction = 270\ncar1.y = 20\ncar1.x = 340\ncar2.direction = 270\ncar2.y = 50\ncar2.x = 340\n\ndef loop ():\n if key.right:\n car1.direction = car1.direction + 4\n \n if key.left:\n car1.direction = car1.direction - 4\n \n if car1.touched(grass):\n car1.step_forward(0.3)\n else:\n car1.step_forward(2.5)\n \n if key.d:\n car2.direction = car2.direction + 4\n \n if key.a:\n car2.direction = car2.direction - 4\n \n if car2.touched(grass):\n car2.step_forward(0.3)\n else:\n car2.step_forward(2.5)\n \n if car2.touched(end) or car1.touched(end):\n game.stop()\n \ngame.forever(loop)","created_at":"2020-07-06T00:32:28.385+08:00","updated_at":"2020-08-11T17:00:45.426+08:00","name":"迷你賽車_T ","language":"python","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/162822/d09a7fafc36f8805592a1aec59af8085.jpg"},"parent_id":160618,"plugin":"game.set({'width': 640, 'height': 480})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":136,"hashid":"9ygsmer9","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2832392,"file_name":"border.jpg","project_id":162822,"asset_id":24106,"created_at":"2020-07-06T00:32:28.391+08:00","updated_at":"2020-07-06T00:32:28.391+08:00"},{"id":2832393,"file_name":"car_black.png","project_id":162822,"asset_id":24107,"created_at":"2020-07-06T00:32:28.392+08:00","updated_at":"2020-07-06T00:32:28.392+08:00"},{"id":2832394,"file_name":"car_blue.png","project_id":162822,"asset_id":24110,"created_at":"2020-07-06T00:32:28.393+08:00","updated_at":"2020-07-06T00:32:28.393+08:00"},{"id":2832395,"file_name":"car_red.png","project_id":162822,"asset_id":24108,"created_at":"2020-07-06T00:32:28.394+08:00","updated_at":"2020-07-06T00:32:28.394+08:00"},{"id":2832396,"file_name":"car_yellow.png","project_id":162822,"asset_id":24109,"created_at":"2020-07-06T00:32:28.395+08:00","updated_at":"2020-07-06T00:32:28.395+08:00"},{"id":2832397,"file_name":"grass.png","project_id":162822,"asset_id":23940,"created_at":"2020-07-06T00:32:28.396+08:00","updated_at":"2020-07-06T00:32:28.396+08:00"},{"id":2832398,"file_name":"e.png","project_id":162822,"asset_id":24111,"created_at":"2020-07-06T00:32:28.398+08:00","updated_at":"2020-07-06T00:32:28.398+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦