Play Rock-paper-scissor

Let’s play Rock-Paper-Scissor with Pan-Tilt HAT. Pan-Tilt HAT can judge who is the winner according to your gestures and print the result.

../_images/sp21hannn.jpg

TIPS

You may want to simplify the program with Functions, especially when you perform the same operation multiple times. Putting these operations into a newly declared function can greatly facilitate your use.

../_images/sp211112_103410.png

This block produces a random integer in a certain range and you can modify the upper and lower limits.

../_images/sp211112_103440.png

EXAMPLE

../_images/sp211112_102441.png ../_images/sp211112_102500.png