1 / 12

貪吃蛇

遊戲. 貪吃蛇. 工作日誌. 6/1 決定大略方向 6/2 開始打貪吃蛇的程式碼 6/8 程式碼完成 6/10 PPT 完成. 發展文件. http://ecourse.elearning.ccu.edu.tw/php/Testing_Assessment/show_allwork.php?action=downloadFile&work_id=11&filename=400415028_e8362d.c. 測試文件.

talasi
Download Presentation

貪吃蛇

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 遊戲 貪吃蛇

  2. 工作日誌 • 6/1 決定大略方向 • 6/2 開始打貪吃蛇的程式碼 • 6/8 程式碼完成 • 6/10PPT完成

  3. 發展文件 • http://ecourse.elearning.ccu.edu.tw/php/Testing_Assessment/show_allwork.php?action=downloadFile&work_id=11&filename=400415028_e8362d.c

  4. 測試文件 • http://ecourse.elearning.ccu.edu.tw/php/Testing_Assessment/show_allwork.php?action=downloadFile&work_id=11&filename=400415028_e8362d.exe

  5. 分工情況 • 一人,無分工

  6. 使用說明 • 貪吃蛇,下上左右移動,不能反方向移動,可穿牆,吃到自己死 • OO為頭,!!為食物,TT為身體

  7. 大略構想 • Struct裡指向x與y座標 • 由確認struct中的x、y來決定陣列中的哪一點該print什麼 • 輸入使其移動,藉由x、y加減一((x+-1%17,y+-1%17))) • 如果沒有輸入,指向的座標改變用條件式與上個座標方向相同(一開始是(x+1%17,y%17)) • 如果輸入的方向與當前位置相反,用條件式使其不產生作用 • 吃到東西後,該位置變為頭部,身體加長一截 • 每當移動時,確任頭移動的位置是否為身體中已包含的位置,是則遊戲結束,否則重新更新

  8. 程式註解 • 包含在程式碼中

  9. 成果展示 • 一開始

  10. 成果展示 • 行進中的貪吃蛇

  11. 成果展示 • 吃完食物的貪吃蛇

  12. 成果展示 • Game Over

More Related