Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun{FarmMode S PossiblePath NearestGhost NearestBonus NearestPoint}
- NPossiblePath Path1 Path2 Path3 NP in
- NPossiblePath = {ErasePosition PossiblePath S.lposition nil}
- if NearestPoint \= nil then
- Path1 = {BestPath NPossiblePath NearestPoint.1.position nil 0}
- else
- Path1 = NPossiblePath
- end
- if Path1.2==nil then
- NP = Path1
- else
- if NearestBonus \=nil then
- Path2 = {BestPath Path1 NearestBonus.1.position nil 0}
- else
- Path2 = Path1
- end
- if Path2.2==nil then
- NP = Path2
- else
- if NearestGhost\=nil then
- Path3 = {Loop Path2 NearestGhost AvoidGhost {NumberOfElement Path2 0} {NumberOfElement NearestGhost 0}}
- else
- Path3 = Path2
- end
- if Path3.2==nil
- then NP = Path3
- else
- NP = {SelectRandom Path3}
- end
- end
- end
- NP
- end
- fun{ChillMode S PossiblePath NearestGhost NearestBonus NearestPoint}
- NPossiblePath Path1 Path2 Path3 NP in
- NPossiblePath = {ErasePosition PossiblePath S.lposition nil}
- if NearestBonus \= nil then
- Path1 = {BestPath NPossiblePath NearestBonus.1.position nil 0}
- else
- Path1 = NPossiblePath
- end
- if Path1.2==nil
- then
- NP = Path1
- else
- Path2 = {Loop Path1 NearestGhost AvoidGhost {NumberOfElement Path1 0} {NumberOfElement NearestGhost 0}}
- if Path2.2==nil
- then
- NP = Path2
- else
- if NearestPoint \= nil then
- Path3 = {BestPath Path2 NearestPoint.1.position nil 0}
- else
- Path3 = Path2
- end
- if Path3.2==nil
- then NP = Path3
- else
- NP = {SelectRandom Path3}
- end
- end
- end
- NP
- end
- fun{SurvivalMode S PossiblePath NearestGhost NearestBonus NearestPoint}
- Path1 Path2 Path3 NP in
- Path1 = {Loop PossiblePath NearestGhost AvoidGhost {NumberOfElement PossiblePath 0} {NumberOfElement NearestGhost 0}}
- if Path1.2==nil
- then
- NP = Path1
- else
- if NearestBonus \= nil then
- Path2 = {BestPath Path1 NearestBonus.1.position nil 0}
- else
- Path2 = Path1
- end
- if Path2.2==nil
- then
- NP = Path2
- else
- if NearestPoint \= nil then
- Path3 = {BestPath Path2 NearestPoint.1.position nil 0}
- else
- Path3 = Path2
- end
- if Path3.2==nil
- then NP = Path3
- else
- NP = {SelectRandom Path3}
- end
- end
- end
- NP
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement