当前位置: 首页>>代码示例>>Python>>正文


Python Space.createExit方法代码示例

本文整理汇总了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)
开发者ID:simfarm,项目名称:lord-of-the-rings,代码行数:70,代码来源:game_loader.py

示例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
开发者ID:dchukhin,项目名称:lord-of-the-rings,代码行数:104,代码来源:game_loader.py


注:本文中的space.Space.createExit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。