極客戰(zhàn)記攻略——矮人騷亂 | python

因為這關(guān)也算復(fù)習(xí)關(guān),我只好再列單詞表了,:)

1 單詞復(fù)習(xí)

code

combat

hero

move

attack

while

loop

true

false

enemy

find

near

2 相關(guān)技能

回顧一下我們已有的技能唄!

findNearestEnemy()

attack()

當(dāng)然,還有最最重要的while True循環(huán)!

3 通關(guān)思路

發(fā)現(xiàn)一個,干掉一個!哈哈

3.1 源代碼

# 在 while true循環(huán)里,使用 findNearestEnemy() 并攻擊!

while True:
    enemy = hero.findNearestEnemy()
    hero.attack(enemy)
    hero.attack(enemy)
   

A 附注

當(dāng)前地圖:Kithgard地牢
關(guān)卡鏈接:https://codecombat.163.com/play/dungeon

B 同主題文章

極客戰(zhàn)記攻略——Kithgard地牢 | python
極客戰(zhàn)記攻略——深藏的寶石 | python
極客戰(zhàn)記攻略——幽影守衛(wèi) | python
極客戰(zhàn)記攻略——真名實姓 | python
極客戰(zhàn)記攻略——高舉之劍 | python
極客戰(zhàn)記攻略——焰中舞動 | python
極客戰(zhàn)記攻略——kithmaze二度冒險 | python
極客戰(zhàn)記攻略——老對手 | python
極客戰(zhàn)記攻略——名稱大師 | python

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容