Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:instructions:rockpaperscissors [2018/06/28 09:49] – [Solution] kniwwelino | en:instructions:rockpaperscissors [2019/11/13 09:31] (current) – [Solution] kniwwelino | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Rock-Paper-Scissors ===== | ||
| + | A digital version of the Rock-Paper-Scissors version allowing you to play against each other or against the computer. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | To program this example you need to use the buttons, the matrix, variables, logic, and math. | ||
| + | |||
| + | ==== Programming ==== | ||
| + | You can program the game progressively. For each step, add the displayed blocks and put them in the right order. You can then test your program by clicking on {{: | ||
| + | |||
| + | === Step 1: Showing a number when a button is pressed === | ||
| + | * You will say to Kniwwelino: « //If I press button A then write " | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | \\ | ||
| + | === Step 2: Showing a random number when a button is pressed === | ||
| + | * You will say to Kniwwelino: « //If I press button A then choose a random number between 1 and 3 and write this number into a variable named '' | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | * After Kniwwelino chose a random number between 1 and 3, you will say to Kniwwelino: « //Show the variable '' | ||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | === Step 3: Showing different images for the numbers 1, 2, and 3 === | ||
| + | |||
| + | Instead of writing the number in '' | ||
| + | * Delete the block writing the number | ||
| + | {{: | ||
| + | |||
| + | * Replace it with your first condition made of the following blocks. | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | * Repeat the previous point for the two other conditions. | ||
| + | |||
| + | ==== Solution ==== | ||
| + | |||
| + | [[en: | ||
| + | |||
| + | Print versions available for download in [[en: | ||
| + | ==== Crafting ==== | ||
| + | |||
| + | |||