The classic game of rock paper scissors where the micro:bit display a different symbol when shaken.
The program starts with a rule that uses
a shake event and 3-face dice is cast. The result is stored in variable X
.
- when shake, do set variable X to random number between 1 and 3.
- when shake, do play sound hello.
The next 3 rules match the value passed in variable X
and display a different symbol for each value, 1, 2 or 3.
- when variable
X
changes to 1, do show image paper.
- when variable
X
changes to 2, do show image rock.
- when variable
X
changes to 3, do show image scissors.
improvement ideas
- increase the range of the dice and add more images!