Skip to the content.

Crooked Head or tail MicroCode program

This is a crooked variation of the head or tail sample where tail has 66% chances of happening. We acheive this by generating random numbers between 1 and 3 and assigning tail to 2 and 3.

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, set variable X to random number up to 3

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 changed to 1, show head

when variable X changed to 2, show head when variable X changed to 2, show tail