Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
機率統計b0129016
Search
chiwen
June 20, 2014
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
機率統計b0129016
chiwen
June 20, 2014
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
Automating Front-end Workflow
addyosmani
1369
210k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
How STYLIGHT went responsive
nonsquared
100
6.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Thoughts on Productivity
jonyablonski
76
5.4k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
YesSQL, Process and Tooling at Scale
rocio
174
15k
Done Done
chrislema
187
17k
Transcript
機率與統計 (期末報告) B0129016 溫娸
使用函式 Ø def 主程式() Ø def 開始遊戲() Ø def 顯示初始蜘蛛(currentHealth)
Ø def 終止() Ø def 取得跳躍數值(現在跳躍數值, 跳躍速度, 跳躍高度 ) Ø def 取得隨機速度() Ø def 隨機草(畫面x, 畫面y, 物件寬, 物件高) Ø def 製造新蜘蛛(畫面x, 畫面y) Ø def 製造新草(畫面x, 畫面y) Ø def 活動畫面外(畫面x, 畫面y, obj)
1. 先做一些前置的設定 放入圖片們
2. 遊戲結束時出現的’Game Over’和贏遊戲時出現的字
3. 放一些隨機產 生的蜘蛛和草 4. 玩家在未達到此距離前 螢幕不需跟著移動
5. 玩家的上下左右移動以及圖案的左右 翻轉
6. 玩家若吃到比自己小的蜘蛛è體型變大 玩家若是吃到比自己體型大的蜘蛛è扣生命值加上 短暫的無敵時間
7. 玩家一開始的生命值 8. 遊戲結束 9. 玩家現在跳躍的速度跟 跳躍高度 10. 電腦蜘蛛隨機速度 11.
隨機在畫面上顯示草
12. 電腦蜘蛛的圖案大小,速度, 行動 方向圖案該朝左還右 13. 在畫面上隨機製造草
玩法 1. 在畫面中間的蜘蛛為玩家 2. 以上下左右鍵控制那隻蜘蛛 3. 吃比自己體積小的蜘蛛可以讓玩家蜘蛛長大 4. 吃到比自己體型還大隻的蜘蛛就會扣生命值和獲得短暫的無敵狀態 5.
若是生命值歸零,則遊戲結束 6. 體積達到贏遊戲所要的最大體積,也算遊戲結束 7. 按r可以重新完一遍