Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Rect ( 0 , 0 , 4 0 0 , 4 0 0 , fill = gradient ( ' steelBlue ' , 'lightSteelBlue', start =
Rect fillgradientsteelBlue 'lightSteelBlue', start'top' Press sd and f Notice how they change the left hand to rock, paper, and # Rock against scissors. scissors. Press Ik and j and notice how the right hand changes in a similar way. onKeyPress onKeyPressj This is the console. Error messages output here. leftThrow LabelRock size rightThrow LabelRock size leftInstructions LabelUse s d f key to control left', size rightInstructions LabelUse j k l key to control right', size def drawFingerx y x y: Linex y x y fill'gold', lineWidth Circlex y fill'gold' def drawLeftHand: Circle fill'gold' if leftThrowvalue 'Rock': drawFinger drawFinger if leftThrowvalue 'Paper': drawFinger drawFinger drawFinger leftThrow.toFront def drawRightHand: Circle fill'gold' if rightThrowvalue 'Rock': drawFinger drawFinger if rightThrowvalue 'Paper': drawFinger drawFinger drawFinger rightThrow.toFront def drawWinnerleftMove rightMove: # Check leftMove and rightMove and draw accordingly. ### HINT: It matters if we use uppercase or lowercase here! ### Place Your Code Here ### pass def throwdown: # Draw over the old hand and redraw the hands. Rect fillgradientsteelBlue 'lightSteelBlue', start'top' drawLeftHand drawRightHand drawWinnerleftThrowvalue, rightThrow.value leftInstructions.toFront rightInstructions.toFront def onKeyPresskey: if key s: leftThrow.value 'Rock' elif key d: leftThrow.value 'Paper' elif key f: leftThrow.value 'Scissors' elif key l: rightThrow.value 'Rock' elif key k: rightThrow.value 'Paper' elif key j: rightThrow.value 'Scissors' throwdown drawLeftHand drawRightHand Rock paper scissors Press sd and f Notice how they change the left hand to rock, paper, and scissors. Press Ik and j and notice how the right hand changes in a similar way. Also notice how the comparison symbol between the hands changes based on the rules of rockpaperscissors. Miscellaneous # Rock against scissors. onKeyPress onKeyPress # Paper against scissors. onKeyPressd onKeyPress # Paper against rocks. onKeyPress onKeyPress This is the console. Error messages output here.
Rect fillgradientsteelBlue 'lightSteelBlue', start'top' Press sd and f Notice how they change the left hand to rock, paper, and
# Rock against scissors.
scissors. Press Ik and j and notice how the right hand changes in a similar way.
onKeyPress
onKeyPressj
This is the console. Error messages output here.
leftThrow LabelRock size
rightThrow LabelRock size
leftInstructions LabelUse s d f key to control left', size
rightInstructions LabelUse j k l key to control right', size
def drawFingerx y x y:
Linex y x y fill'gold', lineWidth
Circlex y fill'gold'
def drawLeftHand:
Circle fill'gold'
if leftThrowvalue 'Rock':
drawFinger
drawFinger
if leftThrowvalue 'Paper':
drawFinger
drawFinger
drawFinger
leftThrow.toFront
def drawRightHand:
Circle fill'gold'
if rightThrowvalue 'Rock':
drawFinger
drawFinger
if rightThrowvalue 'Paper':
drawFinger
drawFinger
drawFinger
rightThrow.toFront
def drawWinnerleftMove rightMove:
# Check leftMove and rightMove and draw accordingly.
### HINT: It matters if we use uppercase or lowercase here!
### Place Your Code Here ###
pass
def throwdown:
# Draw over the old hand and redraw the hands.
Rect fillgradientsteelBlue 'lightSteelBlue', start'top'
drawLeftHand
drawRightHand
drawWinnerleftThrowvalue, rightThrow.value
leftInstructions.toFront
rightInstructions.toFront
def onKeyPresskey:
if key s:
leftThrow.value 'Rock'
elif key d:
leftThrow.value 'Paper'
elif key f:
leftThrow.value 'Scissors'
elif key l:
rightThrow.value 'Rock'
elif key k:
rightThrow.value 'Paper'
elif key j:
rightThrow.value 'Scissors'
throwdown
drawLeftHand
drawRightHand Rock paper scissors
Press sd and f Notice how they change the left hand to rock, paper, and
scissors. Press Ik and j and notice how the right hand changes in a similar way.
Also notice how the comparison symbol between the hands changes based on
the rules of rockpaperscissors.
Miscellaneous
# Rock against scissors.
onKeyPress
onKeyPress
# Paper against scissors.
onKeyPressd
onKeyPress
# Paper against rocks.
onKeyPress
onKeyPress
This is the console. Error messages output here.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started