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


Python Move.doubleAdd方法代码示例

本文整理汇总了Python中models.Move.doubleAdd方法的典型用法代码示例。如果您正苦于以下问题:Python Move.doubleAdd方法的具体用法?Python Move.doubleAdd怎么用?Python Move.doubleAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.Move的用法示例。


在下文中一共展示了Move.doubleAdd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: linkHarder

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import doubleAdd [as 别名]
def linkHarder(movesGraph, difficulty=1) -> None:
    """Links some harder moves."""
    if difficulty >= 2:
        for i in movesGraph['revolvedHalfMoon']: i.time += 5
        movesGraph['downwardDog'].addLateMove(movesGraph['handstandHops'])
        movesGraph['vinyasa'].addMove(movesGraph['forwardFold'])
        Move.doubleAdd(movesGraph['runningMan'], movesGraph['chinStand'])
        Move.doubleAdd(movesGraph['triangle'], movesGraph['boundHalfMoon'], late=True)
        for i in movesGraph['cresent']: i.addLateMove(movesGraph['handstandHops'])
        movesGraph['crow'].addLateMove(movesGraph['crane'])
    if difficulty >= 1:
        movesGraph['vinyasa'].time = max(0, movesGraph['vinyasa'].time - 2)
        movesGraph['mountain'].time = max(0, movesGraph['mountain'].time - 2)
        for i in movesGraph['eagle']: i.time += 5
        for i in movesGraph['halfMoon']: i.time += 5
        movesGraph['star'].time += 5
        movesGraph['chair'].time += 5
        for i in movesGraph['warrior1']: i.time -= 2
        for i in movesGraph['warrior2']: i.time -= 2
        for i in movesGraph['chairTwist']: i.time += 5
        movesGraph['forwardFold'].addMove(movesGraph['crow'])
        movesGraph['seatedMeditation'].addMove(movesGraph['frog'])
        movesGraph['staff'].addMove(movesGraph['frog'])
        movesGraph['child'].addLateMove(movesGraph['supportedHeadstand'])
        movesGraph['downwardDog'].addLateMove(movesGraph['supportedHeadstand'])
        Move.doubleAdd(movesGraph['threeLeggedDog'], movesGraph['pigeon'])
        for i in movesGraph['twoLeggedDog']: i.addLateMove(movesGraph['plank'])
        Move.moveReverse(movesGraph['sidePlank'])
    for i in movesGraph['warrior3']: i.time += 5*max(difficulty,0)
    for i in ['warrior1', 'warrior2', 'standingLegLift4', 'threeLeggedDog']:
        for j in movesGraph[i]: j.promoteLate()
    for i in ['star', 'mountain', 'downwardDog']:
        movesGraph[i].promoteLate()
    movesGraph['mountain'].promoteLate(n=max(1, difficulty+1))
开发者ID:shulinye,项目名称:yoga,代码行数:36,代码来源:moves.py

示例2: generateMoves

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import doubleAdd [as 别名]

#.........这里部分代码省略.........
    movesGraph['vinyasa'].addMove(movesGraph['downwardDog'])
    movesGraph['table'].addMove(*movesGraph['threadTheNeedle'])
    movesGraph['catCow'].addMove(movesGraph['table'])
    movesGraph['mountain'].addMove(movesGraph['forwardFold'], movesGraph['chair'], *movesGraph['standingTwist'])
    movesGraph['mountain'].addMove(*movesGraph['standingSideStretch'])
    movesGraph['mountain'].addMove(*movesGraph['standingTwist'])
    if difficulty >= 0:
        movesGraph['mountain'].last = movesGraph['chair']
        movesGraph['mountain'].addLateMove(*movesGraph['dancer'])
    movesGraph['backBend'].addMove(movesGraph['mountain'], movesGraph['forwardFold'], *movesGraph['standingSideStretch'])
    movesGraph['staff'].addMove(movesGraph['lieOnBack'], movesGraph['butterflyStretch'], movesGraph['camel'], movesGraph['seatedMeditation'])
    if difficulty >= 0:
        movesGraph['staff'].addMove(movesGraph['boat'])
        movesGraph['staff'].addLateMove(movesGraph['yogaBicycles'], movesGraph['mountain'])
    movesGraph['downwardDog'].addMove(movesGraph['plank'])
    if difficulty >= 1:
        movesGraph['downwardDog'].addLateMove(movesGraph['lowPlank'])
    movesGraph['flatBack'].addMove(movesGraph['forwardFold'])
    movesGraph['flatBack'].addLateMove(movesGraph['chair'], movesGraph['deepSquat'])
    if difficulty >= 2:
        movesGraph['flatBack'].addLateMove(movesGraph['handstandHops'])
    movesGraph['lieOnBack'].addMove(movesGraph['seatedMeditation'], movesGraph['feetUpAWall'],*movesGraph['spinalTwist'])
    movesGraph['lieOnBack'].addLateMove(movesGraph['lieOnFront'])
    if difficulty >= 0:
        movesGraph['lieOnBack'].addLateMove(movesGraph['wheel'])
    movesGraph['plow'].addMove(movesGraph['fish'])
    if difficulty >= 0:
        movesGraph['fish'].addMove(movesGraph['upwardPlank'])
    movesGraph['upwardPlank'].addMove(movesGraph['lieOnBack'])
    if difficulty >= 1:
        movesGraph['upwardPlank'].addLateMove(*movesGraph['upwardPlankLiftedLeg'])
    movesGraph['supportedShoulderStand'].addMove(movesGraph['plow'])
    movesGraph['plank'].addMove(movesGraph['vinyasa'], *movesGraph['sidePlank'])
    Move.doubleAdd(movesGraph['oneLeggedPlank'], movesGraph['twoPointPlank'])
    if difficulty >= 1:
        movesGraph['plank'].addMove(*movesGraph['oneLeggedPlank'])
        Move.doubleAdd(movesGraph['oneLeggedPlank'], movesGraph['threeLeggedDog'], late = True)
        Move.doubleAdd(movesGraph['twoPointPlank'], movesGraph['twoLeggedDog'], late=True)
    movesGraph['lowPlank'].addMove(movesGraph['upwardDog'], movesGraph['vinyasa'])
    movesGraph['lowPlank'].addLateMove(movesGraph['plank'])
    movesGraph['child'].addMove(*movesGraph['childsPoseSideStretch'])
    movesGraph['child'].addLateMove(movesGraph['seatedMeditation'])
    if difficulty >= 1:
        movesGraph['boat'].addMove(movesGraph['lowBoat'], movesGraph['boatLift'], *movesGraph['boatTwist'])
        movesGraph['boatLift'].addMove(movesGraph['staff'])
        movesGraph['boatLift'].addLateMove(movesGraph['yogaBicycles'])
    movesGraph['lowBoat'].addMove(movesGraph['yogaBicycles'])
    movesGraph['chair'].addMove(movesGraph['deepSquat'], *movesGraph['oneLeggedChair'])
    if difficulty >= 1:
        movesGraph['chair'].addLateMove(*movesGraph['revolvedOneLeggedChair'])
    movesGraph['star'].addMove(movesGraph['goddessSquat'], movesGraph['deepSquat'])
    movesGraph['bridge'].addMove(movesGraph['lieOnBack'], *movesGraph['bridgeWithRaisedLeg'])
    if difficulty >= 0:
        movesGraph['bridge'].addLateMove(movesGraph['upwardPlank'])
    movesGraph['fish'].addMove(movesGraph['lieOnBack'])
    if difficulty >= 1:
        movesGraph['seatedMeditation'].addLateMove(movesGraph['mountain'], movesGraph['boat'], movesGraph['yogaBicycles'])
    movesGraph['seatedForwardFold'].addMove(movesGraph['seatedMeditation'], *movesGraph['headToKnee'])
    movesGraph['forwardFoldShoulderStretch'].addMove(movesGraph['forwardFold'], movesGraph['chair'])
    movesGraph['butterflyStretch'].addMove(*movesGraph['headToKnee'])
    movesGraph['superMan'].addMove(movesGraph['lieOnFront'])
    movesGraph['bow'].addMove(movesGraph['lieOnFront'])
    movesGraph['scale'].addMove(movesGraph['seatedMeditation'])
    movesGraph['wideLegForwardFold'].addMove(*movesGraph['standingLegStretch'])
    movesGraph['forwardFold'].addMove(movesGraph['flatBack'])
    movesGraph['forwardFold'].addLateMove(movesGraph['chair'])
开发者ID:shulinye,项目名称:yoga,代码行数:70,代码来源:moves.py

示例3: linkStrength

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import doubleAdd [as 别名]
def linkStrength(movesGraph, difficulty=1, strength = 0) -> None:
    #New moves
    movesGraph['pushups'] = Move("Pushups", 0, "Pushups", 15 + 5*difficulty, movesGraph['vinyasa'], extended=Move.reDifficultyTimes([20,30],5,difficulty), \
            lateMove=set((movesGraph['plank'],) + movesGraph['sidePlank']), countReps=True)
    movesGraph['pistolSquats'] = Move.twoSides("Pistol Squats", "Pistol Squats, %(same)s foot up", 15+5*difficulty, movesGraph['mountain'], countReps=True, \
            countdown=True, lateMove=set([movesGraph['vinyasa']])) #//TODO: better description
    movesGraph['jumpingSquats'] = Move("Jumping Squats", 0, "Jumping Squats", 30, movesGraph['chair'], \
            movesGraph['forwardFold'], lateMove=set([movesGraph['mountain']]), countReps=True)
    movesGraph['jumpingLunges'] = Move("Jumping Lunges", 0, "Jumping Lunges", 20 + 10*difficulty + 10*strength, movesGraph['vinyasa'], countReps=True)
    movesGraph['sideLunges'] = Move("Side Lunges", 0, "Side Lunges", 20 + 10*difficulty, movesGraph['wideLegStance'], countReps=True)
    movesGraph['aroundTheWorld'] = Move.twoSides("Around The World", "Around The World, %(same)s side", 20 + 10*difficulty, movesGraph['mountain'], \
            lateMove=set([movesGraph['vinyasa']]), countReps=True)
    movesGraph['alternatingLunges'] = Move("Alternating Lunges", 0, "Alternating Lunges", 20+10*difficulty, movesGraph['mountain'], \
            movesGraph['vinyasa'], *movesGraph['warrior1'], countdown = True, countReps = True)
    movesGraph['dips'] = Move("Dips", 0, "Dips", 15 + 5*difficulty, movesGraph['vinyasa']) #//TODO: better description
    movesGraph['obliqueCrunch'] = Move.twoSides("Oblique Crunch", "Oblique Crunch, %(same)s side", 20 + 10*difficulty, movesGraph['lieOnBack'], countReps=True)
    movesGraph['balletSquat'] = Move("Ballet Squats", 0, "Ballet Squats", 15 + 5*difficulty, movesGraph['mountain'], movesGraph['star'], countReps=True)
    movesGraph['crunch'] = Move("Crunch", 0, "Crunch", 15+5*difficulty, movesGraph['lieOnBack'], countReps=True, countdown=True)
    movesGraph['jackknife'] = Move("Jack Knife", 0, "Jack Knife", 15+5*difficulty, movesGraph['lieOnBack'], countReps=True, countdown=True)

    #link moves
    movesGraph['downwardDog'].addLateMove(movesGraph['pushups'])
    if difficulty >= 1:
        for i in movesGraph['sidePlank']: i.addLateMove(movesGraph['pushups'])
        movesGraph['mountain'].addLateMove(*movesGraph['aroundTheWorld'])
        movesGraph['chair'].addLateMove(movesGraph['jumpingSquats'], *movesGraph['pistolSquats'])
    if difficulty >= 2 and strength >=2:
        for i in movesGraph['sidePlankLegUp']: i.addLateMove(movesGraph['pushups'])
        movesGraph['pushups'].addLateMove(*movesGraph['sidePlankLegUp'])
        Move.doubleAdd(movesGraph['warrior3'], movesGraph['pistolSquats'], inverted = True, late=True)
        movesGraph['boat'].addMove(movesGraph['jackknife'], *movesGraph['obliqueCrunch'])
    movesGraph['mountain'].addLateMove(movesGraph['jumpingSquats'])
    movesGraph['wideLegStance'].addLateMove(movesGraph['jumpingSquats'], movesGraph['balletSquat'])
    movesGraph['star'].addLateMove(movesGraph['sideLunges'])
    Move.doubleAdd(movesGraph['oneLeggedChair'], movesGraph['pistolSquats'])
    Move.doubleAdd(movesGraph['cresent'], movesGraph['aroundTheWorld'], late = True)
    movesGraph['lieOnFront'].addLateMove(movesGraph['pushups'])
    movesGraph['upwardPlank'].addLateMove(movesGraph['dips'])
    movesGraph['lieOnBack'].addLateMove(movesGraph['crunch'], movesGraph['jackknife'], *movesGraph['obliqueCrunch'])
    movesGraph['lieOnBack'].promoteLate(n=max(1, strength+difficulty))
    if strength >= 2:
        for i in movesGraph['warrior1']: i.addLateMove(movesGraph['alternatingLunges'])
    if strength + difficulty >= 3:
        movesGraph['mountain'].addLateMove(movesGraph['shuffle'])
        Move.doubleAdd(movesGraph['eagle'], movesGraph['pistolSquats'], late=True)
        movesGraph['star'].addLateMove(movesGraph['jumpingSquats'])
        Move.doubleAdd(movesGraph['balancingTableLegOnly'], movesGraph['oneLeggedPlank'], late=True)
        Move.doubleAdd(movesGraph['oneLeggedChair'], movesGraph['pistolSquats'])
        movesGraph['chair'].promoteLate(n=(strength + difficulty)//2)
        for i in movesGraph['warrior1']: i.addLateMove(movesGraph['jumpingLunges'])
    if difficulty >= 1:
        Move.doubleAdd(movesGraph['standingLegLift4'], movesGraph['pistolSquats'], late=True)
        Move.doubleAdd(movesGraph['standingLegLift1'], movesGraph['pistolSquats'], late=True)
    movesGraph['plank'].time += difficulty
开发者ID:shulinye,项目名称:yoga,代码行数:56,代码来源:strengthaerobics.py


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