本文整理汇总了Python中space.Space.createExit方法的典型用法代码示例。如果您正苦于以下问题:Python Space.createExit方法的具体用法?Python Space.createExit怎么用?Python Space.createExit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类space.Space
的用法示例。
在下文中一共展示了Space.createExit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getWorld
# 需要导入模块: from space import Space [as 别名]
# 或者: from space.Space import createExit [as 别名]
#.........这里部分代码省略.........
" tonight."),
"Gondorian chick #1": "Bro, I have a boyfriend....",
"Gondorian chick #2": "Bro, what are you doing later?"
}
beach = Square("Pelargir Beach", description, greeting, talk,
items.unique_items.beachItems)
#City
description = """One of the oldest cities in Middle Earth, Pelargir served
as chief haven of the faithful as Numenorians migrated to Middle Earth to
escape persecution. In later years, Pelargir served as chief port of
Gondor.
"""
greeting = "Enjoy a relaxing stay at Pelargir, port city of Gondor."
pelargir = City("Pelargir", description, greeting, [sunnysideInn,
palmTreeHut, beach])
#Lossamarch
description = """Lossarnach is a region and fiefdom in Southern Gondor.
Known as the Vale of Flowers, it is a fertile region lying south of the
White Mountains.
"""
lossamarch = Space("Lossamarch", description, constants.RegionType.GONDOR,
battleProbability = constants.SpaceSpawnProb.lossamarch,
city = pelargir)
#Ithilien
description = """Ithilien is the fiefdom of Gondor bordering Mordor from
the southwest.
"""
ithilien = Space("Ithilien", description, constants.RegionType.GONDOR,
battleProbability = constants.SpaceSpawnProb.ithilien,
battleBonusDifficulty = constants.SpaceBonusDiff.ithilien)
#Connections: East-West
shire.createExit("east", oldForest, outgoingOnly = False)
oldForest.createExit("east", weatherHills, outgoingOnly = False)
weatherHills.createExit("east", trollshaws, outgoingOnly = False)
trollshaws.createExit("east", mistyMountainsNorth, outgoingOnly = False)
mistyMountainsNorth.createExit("east", highPass, outgoingOnly = False)
barrowDowns.createExit("east", bruinen, outgoingOnly = False)
swanfleet.createExit("east", mistyMountainsSouth, outgoingOnly = False)
fangorn.createExit("east", fieldOfCelebrant, outgoingOnly = False)
fangorn.createExit("east", theWold, outgoingOnly = False)
westfold.createExit("east", westemnet, outgoingOnly = False)
westemnet.createExit("east", eastemnet, outgoingOnly = False)
eastemnet.createExit("east", emynMuil, outgoingOnly = False)
eastfold.createExit("east", nindalf, outgoingOnly = False)
nindalf.createExit("east", deadMarshes, outgoingOnly = False)
anorien.createExit("east", anduin, outgoingOnly = False)
anduin.createExit("east", ephelDuath, outgoingOnly = False)
lossamarch.createExit("east", ithilien, outgoingOnly = False)
orodruin.createExit("east", plateauOfGorgoth, outgoingOnly = False)
#Connections: North-South
oldForest.createExit("south", barrowDowns, outgoingOnly = False)
weatherHills.createExit("south", barrowDowns, outgoingOnly = False)
trollshaws.createExit("south", bruinen, outgoingOnly = False)
bruinen.createExit("south", mitheithel, outgoingOnly = False)
mirkwood.createExit("south", southernMirkwood, outgoingOnly = False)
southernMirkwood.createExit("south", lorien, outgoingOnly = False)
mitheithel.createExit("south", swanfleet, outgoingOnly = False)
swanfleet.createExit("south", dunland, outgoingOnly = False)
dunland.createExit("south", calenardhon, outgoingOnly = False)
lorien.createExit("south", fieldOfCelebrant, outgoingOnly = False)
fieldOfCelebrant.createExit("south", theWold, outgoingOnly = False)
fangorn.createExit("south", westemnet, outgoingOnly = False)
theWold.createExit("south", eastemnet, outgoingOnly = False)
示例2: getWorld
# 需要导入模块: from space import Space [as 别名]
# 或者: from space.Space import createExit [as 别名]
#.........这里部分代码省略.........
cirithUngol = Space("Cirith Ungol", description, city = towerOfCirithUngol)
#Barad Dur
description = """Barad-dur is the Dark Lord Sauron's sanctuary fortress
in Mordor and serves as his base of operations. Over 1400 meters high
and held together by dark magic, it is the largest fortress in
Middle-earth.
"""
greeting = ""
baradDur = City("Barad Dur", description, greeting)
#Plateau of Gorgoth
description = """Plateau of Gorgoroth is a region in the northwestern region of
Mordor. Gorgoroth is the location of the mines and forges which supplied Mordor's
armies with weapons and armor.
"""
plateauOfGorgoth = Space("Plateau of Gorgoth", description, city = baradDur)
#Lossamarch - Pelargir
#Inn
description = "Beach resort along Gondor's finest coast!"
greeting = "Hey bro! Welcome to Sunnyside Inn!"
sunnysideInn = Inn("Sunnyside Inn", description, greeting, 5)
#Shop
description = "Beach accessories and paraphernalia."
greeting = "Hey dude, let's hit the beach later!"
palmTreeHut = Shop("Palm Tree Hut", description, greeting, 14, 6)
#Square
description = "Class-three waves and hot chicks!"
greeting = "Bro, did you see those waves?"
talk = {"Gondorian bro #1": "Bro, let's hit the beach!", "Gondorian bro #2": "Bro! Let's just chill for awhile... bro?", "Gondorian bro #3": "Bro! I hear there's going to be a party later tonight.", "Gondorian chick #1": "Bro, I have a boyfriend....", "Gondorian chick #2": "Bro, what are you doing later?"}
beach = Square("Pelargir Beach", description, greeting, talk)
#City
description = """One of the oldest cities in Middle Earth, Pelargir served
as chief haven of the faithful as Numenorians migrated to Middle Earth to
escape persecution. In later years, Pelargir served as chief port of Gondor.
"""
greeting = "Enjoy a relaxing stay at Pelargir, port city of Gondor."
pelargir = City("Pelargir", description, greeting)
#Lossamarch
description = """Lossarnach is a region and fiefdom in Southern Gondor. Known
as the Vale of flowers, it is a fertile region lying south of the White Mountains.
"""
lossamarch = Space("Lossamarch", description, city = pelargir)
#Ithilien
description = """Ithilien was the region and fiefdom of Gondor bordering Mordor.
"""
ithilien = Space("Ithilien", description)
#Connections: East-West
shire.createExit("east", oldForest, outgoingOnly = False)
oldForest.createExit("east", weatherHills, outgoingOnly = False)
weatherHills.createExit("east", trollshaws, outgoingOnly = False)
trollshaws.createExit("east", mistyMountains, outgoingOnly = False)
mistyMountains.createExit("east", highPass, outgoingOnly = False)
barrowDowns.createExit("east", bruinen, outgoingOnly = False)
swanfleet.createExit("east", moria, outgoingOnly = False)
moria.createExit("east", lorien, outgoingOnly = False)
calenardhon.createExit("east", fangorn, outgoingOnly = False)
fangorn.createExit("east", fieldOfCelebrant, outgoingOnly = False)
fangorn.createExit("east", theWold, outgoingOnly = False)
westfold.createExit("east", westemnet, outgoingOnly = False)
westemnet.createExit("east", eastemnet, outgoingOnly = False)
eastemnet.createExit("east", emynMuil, outgoingOnly = False)
eastfold.createExit("east", nindalf, outgoingOnly = False)
nindalf.createExit("east", deadMarshes, outgoingOnly = False)
deadMarshes.createExit("east", udun, outgoingOnly = False)
anorien.createExit("east", anduin, outgoingOnly = False)
anduin.createExit("east", ephelDuath, outgoingOnly = False)
lossamarch.createExit("east", ithilien, outgoingOnly = False)
ephelDuath.createExit("east", plateauOfGorgoth, outgoingOnly = False)
cirithUngol.createExit("east", plateauOfGorgoth, outgoingOnly = False)
orodruin.createExit("east", plateauOfGorgoth, outgoingOnly = False)
#Connections: North-South
oldForest.createExit("south", barrowDowns, outgoingOnly = False)
weatherHills.createExit("south", barrowDowns, outgoingOnly = False)
trollshaws.createExit("south", bruinen, outgoingOnly = False)
bruinen.createExit("south", mitheithel, outgoingOnly = False)
highPass.createExit("south", mirkwood, outgoingOnly = False)
mitheithel.createExit("south", swanfleet, outgoingOnly = False)
swanfleet.createExit("south", dunland, outgoingOnly = False)
dunland.createExit("south", calenardhon, outgoingOnly = False)
mirkwood.createExit("south", lorien, outgoingOnly = False)
lorien.createExit("south", fieldOfCelebrant, outgoingOnly = False)
fieldOfCelebrant.createExit("south", theWold, outgoingOnly = False)
calenardhon.createExit("south", westfold, outgoingOnly = False)
fangorn.createExit("south", westemnet, outgoingOnly = False)
theWold.createExit("south", eastemnet, outgoingOnly = False)
westemnet.createExit("south", eastfold, outgoingOnly = False)
eastemnet.createExit("south", nindalf, outgoingOnly = False)
nindalf.createExit("south", cairAndros, outgoingOnly = False)
emynMuil.createExit("south", deadMarshes, outgoingOnly = False)
udun.createExit("south", plateauOfGorgoth, outgoingOnly = False)
cairAndros.createExit("south", anduin, outgoingOnly = False)
cirithUngol.createExit("south", ephelDuath, outgoingOnly = False)
anorien.createExit("south", lossamarch, outgoingOnly = False)
anduin.createExit("south", ithilien, outgoingOnly = False)
return shire