# Hot Potato Game

## Story

Do you know the game Hot Potato?
While music is playing you pass a potato on to your teammates. After the music has been stopped, the player which has the potato loses. You can also play this game with the help of the Calliope mini.

## Rules

• 2-6 players
• All players sit in a circle.
• A player passes the Calliope mini to another person.
• A player must accept if someone wants to give him the Calliope mini.
• Each player may keep the Calliope mini for as long as he wants.
• When the Calliope mini beeps, the game is over. The player with the Calliope mini in his hand has lost.

## The Programm

1Press button A to start your game
1. Delete your program or start a new one.

2. Take the block "on button A pressed" from the section "Input":

1. Click on "Make a Variable" in the section Variable:

2. Press OK.

INFO
You can think of a variable as a box in which you can put your toys - in computer language, this is called saving. The box is given a name so that what you put in it can later be found again. Here this is a random number. The Calliope mini remembers this number and finds it again and again under this name.

Great, you built your first own variable!
Under variable you will now find your new variable:

2Now you need a random number

### You need a random number so you don't know when the Calliope mini will start beeping.

1. Get "pick random 0 to 4" from Math:
1. Get "set item to 0" from Variables:
1. Arrange the blocks like this:
3Teach the Calliope mini how to count down!
1. Get "While...do" from Loops:
1. Get "0 < 0" from Logic and change it to "0>0":

INFO
Greater and lesser have to do with left/right positioning. The verbs ">" (greater than) and "<" (less than) are used to talk about this left/right ordering. The higher number stands on the site where the opening is.
i am smaller < i am larger

1. Assemble the blocks like this:
1. Get "pause (ms)" from Basics:
1. Insert the "pause (ms)"-block like this:
1. Build a flashing pattern using the "show leds"-block from basics:
1. Get "change item by 1" from variables:
2. Drag the block "change item by 1" below "show leds"!
3. Change the block "change item by 1" to "change counter by -1".

### Great, you taught the Calliope mini how to count down. Now all you have to do is tell the Calliope mini what to do at the end of the game.

• Find these two blocks and put them together:
• Get "0 = 0" from Logic and "counter" from Variables and combine all three:

### At the end of the game your Calliope mini should beep. Therefore you can add music!

• Insert any sound from Music!
• Get and insert "set counter to 1":
• Make sure to change it to "set counter to -1".

### Great, your hot potato game for the Calliope mini is almost finished! So that your Calliope mini doesn't play tones right at the start, you only have to program one more thing.

Search for these two blocks and put them together:

Now increases the value 5 at the block "pick random 0 to 5", otherwise the Game is over very quickly. Change the 5 to a 30, for example!

### Great, you taught the Calliope mini the hot potato game. Try it out with your family, too!

This text as well as the images are published under a CC BY-SA 3.0 DE license popup: yes. It was originally published in German popup: yes by InfoSphere popup: yes and translated into English by the Calliope team.