Scanne avec ton iPhone pour installer
Play The Game, it’s fun.
Nouveautés
Version 1.0
First release
Ce qu’il fait
29 actions-
CommentThis shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=309eee8f-5512-4fe5-82e1-e70551a242d7
-
Number
-
Set VariableuserScore
-
Number
-
Set VariableshortcutScore
-
Random Number
-
Ask for InputGuess the shortcut's number (1-10):
-
Text
-
Text
-
Text
-
If
-
Calculate
-
Set VariableuserScore
-
Show Result
-
If
-
Show Result
-
Ask for InputChoose a number for the shortcut to guess (1-10):
-
Random Number
-
Text
-
Text
-
Text
-
If
-
Calculate
-
Set VariableshortcutScore
-
Show Result
-
If
-
Show Result
-
Text
-
Show Result
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#define glyph magicWandAlt
// This shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=309eee8f-5512-4fe5-82e1-e70551a242d7
@userScore = 0
@shortcutScore = 0
const ShortcutNumber = randomNumber(1, 10)
const UserGuess = prompt("Guess the shortcut's number (1-10):", "Number", false)
const Text_userGuess = "{}"
const Text_shortcutNumber = "{ShortcutNumber}"
if Text_userGuess == Text_shortcutNumber {
@userScore = @userScore + 15
show("Correct! You get 15 points.")
} else {
show("Wrong! You get 0 points.")
}
const UserNumber = prompt("Choose a number for the shortcut to guess (1-10):", "Number", false)
const ShortcutGuess = randomNumber(1, 10)
const Text_shortcutGuess = "{ShortcutGuess}"
const Text_userNumber = "{}"
if Text_shortcutGuess == Text_userNumber {
@shortcutScore = @shortcutScore + 15
show("Shortcut guessed your number! Shortcut gets 15 points.")
} else {
show("Shortcut guessed wrong! Shortcut gets 0 points remain 0.")
}
const FinalText = "Final Scores:\nYou: {@userScore}\nShortcut: {@shortcutScore}"
show(FinalText)
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Plus de boomchickaboomboom
Ça pourrait aussi te plaire
Publicité