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


Python Move.reDifficultyTimes方法代码示例

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


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

示例1: linkAerobics

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import reDifficultyTimes [as 别名]
def linkAerobics(movesGraph, difficulty = 1, aerobics = 0):
    """Adds in aerobics moves"""
    movesGraph['jumpingJacks'] = Move("Jumping Jacks", 0, "Jumping Jacks!", 40 + 20*difficulty, movesGraph['mountain'], countReps=True, countdown=True)
    movesGraph['runInPlace'] = Move("Running In Place", 0, "Run In Place", 40 + 20*difficulty, movesGraph['mountain'], movesGraph['jumpingJacks'], countdown=True)
    movesGraph['burpies'] = Move("Burpies!", 0, "Burpies", 30+10*difficulty, movesGraph['vinyasa'], movesGraph['forwardFold'], movesGraph['plank'], \
            extended=Move.reDifficultyTimes([60,75,90], 10, difficulty+aerobics), countReps=True, countdown=True)
    movesGraph['situps'] = Move("Situps", 0, "Situps", 30 + 10*difficulty, movesGraph['vinyasa'], extended=Move.reDifficultyTimes([40,50],10,difficulty + aerobics//2), \
            lateMove=set([movesGraph['boat']]), countReps=True)
    movesGraph['shuffle'] = Move("Shuffle", 0, "Shuffle", 30+10*difficulty, movesGraph['vinyasa']) #//TODO: better description
    movesGraph['highKnees'] = Move("High Knees", 0, "High Knees", 30+10*difficulty, movesGraph['vinyasa'])
    #linking here
    movesGraph['mountain'].addLateMove(movesGraph['jumpingJacks'], movesGraph['runInPlace'], movesGraph['burpies'])
    movesGraph['jumpingJacks'].addLateMove(movesGraph['runInPlace'])
    movesGraph['downwardDog'].addLateMove(movesGraph['burpies'])
    movesGraph['lieOnBack'].addLateMove(movesGraph['situps'])
    movesGraph['staff'].addLateMove(movesGraph['situps'])
    if aerobics >= 2:
        movesGraph['star'].addLateMove(movesGraph['jumpingJacks'])
        for i in movesGraph['eagle']: i.addLateMove(movesGraph['runInPlace'])
    if difficulty >= 1:
        movesGraph['seatedMeditation'].addLateMove(movesGraph['situps'])
        movesGraph['runInPlace'].addMove(movesGraph['vinyasa'])
    else:
        movesGraph['burpies'].addMove(movesGraph['mountain'])
    if aerobics + difficulty >= 3:
        movesGraph['mountain'].addLateMove(movesGraph['highKnees'])
        movesGraph['boat'].addLateMove(movesGraph['situps'])
        movesGraph['flatBack'].addLateMove(movesGraph['plank'])
        movesGraph['wideLegStance'].addLateMove(movesGraph['jumpingJacks'])
        movesGraph['jumpingJacks'].addMove(movesGraph['vinyasa'])
开发者ID:shulinye,项目名称:yoga,代码行数:32,代码来源:strengthaerobics.py

示例2: generateMoves

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

示例3: linkStrength

# 需要导入模块: from models import Move [as 别名]
# 或者: from models.Move import reDifficultyTimes [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.reDifficultyTimes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。