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


Python Move.moveReverse方法代码示例

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


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

示例1: linkHarder

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import moveReverse [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: linkCooldown

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import moveReverse [as 别名]
def linkCooldown(movesGraph, difficulty = 1) -> None:
    """Links cooldown moves in."""
    movesGraph['twistedHeadToKnee'] = Move.twoSides("Twisted Head To Knee", "Take your %(same)s hand and grab the inside of your %(same)s foot.\
            Lean sideways over your %(same)s leg.", 30, movesGraph['seatedMeditation'], movesGraph['staff'], movesGraph['lieOnBack'])
    movesGraph['preztel'] = Move.twoSides("Preztel", "Take your %(same)s foot and put it in front of your %(other)s knee. Pull your \
            %(other)s knee towards you", 30, movesGraph['lieOnBack'])
    movesGraph['four'] = Move.twoSides("Four", "Four pose, %(same)s side", 30, movesGraph['supportedShoulderStand'])
    for i in movesGraph['four']: i.addLateMove(movesGraph['lieOnBack'])
    Move.moveReverse(movesGraph['four'], movesGraph['preztel'], movesGraph['twistedHeadToKnee'])

    movesGraph['child'].addMove(*movesGraph['childsPoseSideStretch'])
    movesGraph['downwardDog'].addMove(movesGraph['table'], movesGraph['child'], movesGraph['lieOnBack'])
    movesGraph['vinyasa'].addMove(movesGraph['child'], movesGraph['lieOnBack'], movesGraph['staff'], movesGraph['upwardDog'])
    movesGraph['staff'].addMove(movesGraph['hero'])
    movesGraph['seatedMeditation'].addMove(*movesGraph['cowFace'])
    movesGraph['seatedMeditation'].addMove(*movesGraph['seatedTwist'])
    movesGraph['seatedMeditation'].addMove(*movesGraph['twistedHeadToKnee'])
    movesGraph['mountain'].addMove(movesGraph['backBend'], *movesGraph['standingSideStretch'])
    movesGraph['mountain'].addMove(*movesGraph['standingTwist'])
    movesGraph['backBend'].removeMove(*movesGraph['standingSideStretch'])
    movesGraph['crow'].addMove(movesGraph['child'])
    movesGraph['lieOnBack'].addMove(*movesGraph['preztel'])
    movesGraph['supportedShoulderStand'].addMove(*movesGraph['four'])
    for i in movesGraph['birdOfParadise']: i.addMove(movesGraph['mountain'])
    for i in movesGraph['sidePlank']: i.addMove(movesGraph['lieOnFront'])
    for i in movesGraph['sidePlankLegUp']: i.addMove(movesGraph['lieOnFront'])
    for i in movesGraph['standingLegLift1']: i.addMove(movesGraph['mountain'])
    if difficulty >= 1: movesGraph['wheel'].promoteLate()
开发者ID:shulinye,项目名称:yoga,代码行数:30,代码来源:stretches.py

示例3: defineStretches

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import moveReverse [as 别名]
def defineStretches(movesGraph, difficulty = 1) -> None:
    """Add in a few stretches?"""
    movesGraph['upwardDogStretches'] = Move.twoSides('Upward Dog Stretch', 'Push your %(same)s shoulder forward', 10, movesGraph['upwardDog'])
    Move.moveReverse(movesGraph['upwardDogStretches'])
    movesGraph['halfSplits'] = Move.twoSides('Half Splits', 'Half Splits', 10) #add better description?
    movesGraph['splits'] = Move.twoSides('Splits', 'Splits, %(same)s foot forward', 10)
    if difficulty < 1:
        movesGraph['upwardDog'].addMove(*movesGraph['upwardDogStretches'])
开发者ID:shulinye,项目名称:yoga,代码行数:10,代码来源:stretches.py

示例4: linkEnding

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import moveReverse [as 别名]
def linkEnding(movesGraph) -> None:
    #Allow me to just go from one arm balance to the opposite side, to increase the chances I get balanced
    Move.moveReverse(movesGraph['runningMan'], movesGraph['sideCrow'], movesGraph['flyingPigeon'], \
            movesGraph['revolvedRunningMan'], movesGraph['chinStand'], movesGraph['twoLeggedDog'], \
            movesGraph['oneLeggedPlank'], movesGraph['warrior1'], movesGraph['warrior2'])
    for i in movesGraph['runningMan']: i.addMove(movesGraph['child'])
    for i in movesGraph['revolvedRunningMan']: i.addMove(movesGraph['child'])
    for i in movesGraph['sideCrow']: i.addMove(movesGraph['child'])
    for i in movesGraph['flyingPigeon']: i.addMove(movesGraph['child'])
    for i in movesGraph['twoLeggedDog']: i.addMove(movesGraph['child'], movesGraph['downwardDog'])
    for i in movesGraph['threeLeggedDog']:
        i.addMove(movesGraph['plank'])
        i.time += 1
    for i in movesGraph['pyramid']: i.addMove(movesGraph['wideLegForwardFold'])
    movesGraph['wideLegForwardFold'].addMove(*movesGraph['pyramid'])
    movesGraph['forwardFold'].addMove(*movesGraph['lowLunge'])
开发者ID:shulinye,项目名称:yoga,代码行数:18,代码来源:moves.py

示例5: generateMoves

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import moveReverse [as 别名]
def generateMoves(difficulty = 1):
    # Begin list of moves
    movesGraph = {
            'lowPlank': Move("Low Plank", 0, "Lower down into Low Plank. Hold", 10 + 2*difficulty, \
                    extended_time=Move.reDifficultyTimes([20,30],3,difficulty)),
            'vinyasa': Move("Vinyasa", 0, "Vinyasa", 5 - difficulty, harder="Add in a push up!"),
            'balancingTable': Move.twoSides("Balancing Table", "When you are ready, extend the opposite arm", \
                10, harder="Want a challenge? Extend the same arm."),
            'balancingTableLegOnly': Move.twoSides("Balancing Table, Leg Only", "Extend %(same)s leg behind you", 5 - difficulty),
            'fallenStar': Move.twoSides("Fallen Star","Fallen Star, %(same)s side", 15), #TODO better instructions
            'lowLunge': Move.twoSides("Low Lunge", "Low Lunge, %(same)s foot forward", max(4 - 2*difficulty,0)),
            'threeLeggedDog': Move.twoSides("Three Legged Dog", "Raise your %(same)s foot up. Three Legged Dog", \
                max(5 - 2*difficulty,0), extended_time=Move.reDifficultyTimes([15,30],3,difficulty)),
            'kneeToNose': Move.twoSides("Knee To Nose", "Take your %(same)s knee and bring it towards your nose. Hold.", \
                15 + 2*difficulty, extended_time=Move.reDifficultyTimes([20,30], 3, difficulty)),
            'kneeToElbow': Move.twoSides("Knee To Elbow", "Take your %(same)s knee and bring it to your %(same)s elbow. Hold", \
                15 + 2*difficulty, harder="Try to bring your knee up to your forearm!", extended_time=Move.reDifficultyTimes([20,30],3,difficulty)),
            }
    movesGraph['plank'] = Move("Plank", 0, "Plank. Hold", 25 + 5*difficulty, movesGraph['lowPlank'], \
            extended_time=Move.reDifficultyTimes([40,60],5, difficulty), harder="Throw in a few pushups!", countdown=True)
    movesGraph['oneLeggedPlank'] = Move.twoSides("One Legged Plank", "Raise your %(same)s foot", 10 + difficulty*2, movesGraph['vinyasa'], \
            extended_time=Move.reDifficultyTimes([15,20], 3, difficulty))
    movesGraph['twoPointPlank'] = Move.twoSides("Two Point Plank", "Now raise your %(other)s hand", 10 + difficulty, movesGraph['vinyasa'])
    movesGraph['catCow'] = Move("Cat Cow", 0, "Cat Cow", 10, movesGraph['plank'], *movesGraph['balancingTableLegOnly'], extended_time=[15])
    movesGraph['table'] = Move("Table Pose", 0, "Table Pose", 5-difficulty, movesGraph['catCow'], *movesGraph['balancingTableLegOnly'], \
            extended_time=[10-2*difficulty])
    movesGraph['threadTheNeedle'] = Move.twoSides("Thread The Needle", "Take your %(same)s hand and reach it towards the ceiling. \
            On an exhale, slide it under your other shoulder.", 20-4*difficulty, movesGraph['table'], lateMove=set([movesGraph['catCow']]))
    movesGraph['oneHandedTiger'] = Move.twoSides("One-Handed Tiger", "Reach back and catch your %(same)s foot with your %(other)s hand. Lean \
            into your hand", 15, movesGraph['table'], movesGraph['catCow'])
    movesGraph['seatedForwardFold'] = Move("Seated Forward Fold", 0, "Seated Forward Fold", 15, movesGraph['vinyasa'])
    movesGraph['flyingStaff'] = Move("Flying Staff Pose", 0, "Press down on the ground. Try to lift your body off the ground", \
            20, movesGraph['vinyasa'])
    movesGraph['staff'] = Move("Staff Pose", 0, "Staff Pose", 10, movesGraph['vinyasa'], movesGraph['seatedForwardFold'])
    movesGraph['jumpThru'] = Move("Jump Thru", 0, "Jump Thru", 1, movesGraph['staff'])
    if difficulty >= 1: movesGraph['staff'].addLateMove(movesGraph['flyingStaff'])
    movesGraph['archer'] = Move.twoSides("Archer Pose", "Grab each foot with hand. Try to straighten the %(same)s leg and bend \
            the %(other)s leg, lifting both legs off the ground. Archer Pose.", 30, movesGraph['staff'], movesGraph['vinyasa'])
    movesGraph['butterflyStretch'] = Move("Butterfly Stretch", 0, "Butterfly Stretch", 15, movesGraph['vinyasa'], \
            movesGraph['staff'])
    if difficulty >= 1: movesGraph['butterflyStretch'].addLateMove(*movesGraph['archer'])
    movesGraph['headToKnee'] = Move.twoSides("Head To Knee", "With your %(same)s knee straight and your %(other)s knee bent, \
            reach toward the toes of your %(same)s foot.", 15, movesGraph['staff'], movesGraph['butterflyStretch'])
    movesGraph['child'] = Move("Child's Pose", 0, "Child's Pose", 5 - difficulty, movesGraph['table'], extended_time=[10,15], \
            lateMove=set([movesGraph['catCow']]))
    movesGraph['seatedTwist'] = Move.twoSides("Seated Twist", "Twist to the %(same)s side", 10, movesGraph['vinyasa'])
    movesGraph['scale'] = Move("Scale Pose", 0, "Push upwards with your hands. Try to get your entire body off the ground. Scale Pose", \
            15 + 4*difficulty, movesGraph['vinyasa'])
    movesGraph['seatedMeditation'] = Move("Seated Meditation", 0, "Seated Meditation", 5 - difficulty, movesGraph['child'], movesGraph['table'], \
            movesGraph['catCow'], movesGraph['butterflyStretch'], movesGraph['staff'], *movesGraph['seatedTwist'], \
            extended_time=Move.reDifficultyTimes([20,30], -3, difficulty))
    if difficulty >= 1: movesGraph['seatedMeditation'].addLateMove(movesGraph['scale'], movesGraph['vinyasa'])
    movesGraph['childsPoseSideStretch'] = Move.twoSides("Child's Pose, Side Stretch", "Reach your fingers over to your %(same)s side. \
            You should feel a stretch across your %(other)s side body", 8, movesGraph['child'], movesGraph['table'], \
            movesGraph['seatedMeditation'], lateMove=set([movesGraph['staff']]))
    movesGraph['kneeToOtherElbow'] = Move.twoSides("Knee To Other Elbow", "Take your %(same)s knee and bring it across your body to \
            your %(other)s elbow", 15 + 2*difficulty, movesGraph['vinyasa'], extended_time=Move.reDifficultyTimes([20,30], 3, difficulty))
    movesGraph['standingLegLift1'] = Move.twoSides("Standing Leg Lift", "Raise your %(same)s foot up and grab it with your %(same) hand. \
            Standing Leg Lift. Hold", 15 + 3*difficulty, extended_time=Move.reDifficultyTimes([30,45,60], 5, difficulty))
    movesGraph['standingLegLift2'] = Move.twoSides("Standing Leg Lift, Leg to Side", "Now take your %(same)s foot and move it out to the side. Hold", \
            20 + 5*difficulty, extended_time=Move.reDifficultyTimes([30,45,60], 5, difficulty))
    movesGraph['twistedStandingLegLift'] = Move.twoSides("Standing Leg Lift, Twisted", "Take your %(same)s foot with your %(other)s hand and twist to the %(other)s side.", \
            20+5*difficulty, extended_time = Move.reDifficultyTimes([30,45,60],5, difficulty))
    movesGraph['standingLegLift3'] = Move.twoSides("Standing Leg Lift, Both Hands", "Return %(same)s foot to center. \
            Grab with both hands, head to knee or chin to shin. Hold.", 20, extended_time=Move.reDifficultyTimes([30,45,60], 5, difficulty))
    movesGraph['standingLegLift4'] = Move.twoSides("Standing Leg Lift, No Hands", "Release %(same)s foot. Hold foot up towards ceiling.", \
            25 + 5*difficulty, extended_time=Move.reDifficultyTimes([30,45,60], 5, difficulty))
    movesGraph['eagle'] = Move.twoSides("Eagle Pose", "Take your %(same)s foot and twist it over your %(other)s leg. Twine your arms, %(same) arm lower. \
            Eagle Pose", 20 + 3*difficulty, extended_time=Move.reDifficultyTimes([35,40], 5, difficulty), \
            harder="Bring your elbows to your knees, and then straighten. Repeat")
    movesGraph['tree'] = Move.twoSides("Tree Pose", "Tree Pose, %(same)s side", 20 + 3*difficulty, movesGraph['vinyasa'], \
            extended_time=Move.reDifficultyTimes([45,60], 5, difficulty))
    movesGraph['halfBoundStandingLotus'] = Move.twoSides("Half-Bound Standing Lotus", "Take your %(same)s foot and put it at the top of your %(other)s thigh. \
            With your %(same)s hand, reach behind you and grab your %(same)s foot", 10 + 2*difficulty, movesGraph['vinyasa'], \
            harder="Lean forwards and touch the ground with your free hand.", extended_time=Move.reDifficultyTimes([30,45],3,difficulty))
    movesGraph['standingLotusSquat'] = Move.twoSides("Standing Lotus Squat", "Bend your %(other)s thigh and squat down", 15+3*difficulty, \
            movesGraph['vinyasa'], extended_time=Move.reDifficultyTimes([20,30],4,difficulty))
    movesGraph['toestand'] = Move.twoSides("Toestand", "Continue bending down, rise up onto the toes of your %(other)s foot", \
            15+3*difficulty, movesGraph['vinyasa'], harder="Try to get your hands to your heart!", \
            extended_time=Move.reDifficultyTimes([20,30],4,difficulty))
    movesGraph['flyingPigeon'] = Move.twoSides("Flying Pigeon", "Plant your hands on the ground and lift your %(same)s foot. Flying Pigeon", \
            30, movesGraph['vinyasa'])
    movesGraph['dancer'] = Move.twoSides("Dancer Pose", "Dancer Pose, %(same)s side", 20 + 5*difficulty, movesGraph['vinyasa'], \
            extended_time=Move.reDifficultyTimes([25,45],5,difficulty))
    movesGraph['backBend'] = Move("Back Bend", 0, "Raise your hands towards the ceiling and bend backwards", 10-difficulty, movesGraph['vinyasa'])
    movesGraph['wideLegStance'] = Move("Wide Leg Stance", 0, "Wide Leg Stance", 5 - difficulty)
    movesGraph['wideLegForwardFold'] = Move("Wide Leg Forward Fold", 0, "Wide Leg Forward Fold", 15, movesGraph['wideLegStance'])
    movesGraph['armPressurePose'] = Move("Arm Pressure Pose", 0, "Wrap legs around shoulders. Attempt to balance on arms.", \
            30, movesGraph['wideLegForwardFold'])
    movesGraph['standingLegStretch'] = Move.twoSides("Standing Leg Stretch", "Reach for your %(same)s foot", \
            10, movesGraph['wideLegStance'], movesGraph['wideLegForwardFold'])
    Move.moveReverse(movesGraph['standingLegStretch'])
    movesGraph['mountain'] = Move("Mountain Pose", 0, "Mountain Pose", 5 - difficulty, movesGraph['backBend'], movesGraph['wideLegStance'], \
            *movesGraph['standingLegLift1'], extended_time=[10])
    movesGraph['standingSideStretch'] = Move.twoSides("Standing Side Stretch", "Lean to the %(same)s side", \
            10, movesGraph['backBend'], movesGraph['mountain'])
    movesGraph['standingTwist'] = Move.twoSides("Standing Twist", "Bring your arms up to shoulder level and twist to the %(same)s", \
            15, movesGraph['mountain'], lateMove=set([movesGraph['backBend']]))
    movesGraph['forwardFoldShoulderStretch'] = Move("Forward Fold, Shoulder Stretch", 0, \
            "Clasp your hands together behind your head and allow gravity to drag your pinkies towards the floor", \
#.........这里部分代码省略.........
开发者ID:shulinye,项目名称:yoga,代码行数:103,代码来源:moves.py

示例6: linkStrengthHarder

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import moveReverse [as 别名]
def linkStrengthHarder(movesGraph, difficulty=1, strength = 0) -> None:
    Move.moveReverse(movesGraph['pistolSquats'])
    movesGraph['mountain'].promoteLate(n=max(1, difficulty+1))
    movesGraph['plank'].time += 5
开发者ID:shulinye,项目名称:yoga,代码行数:6,代码来源:strengthaerobics.py


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