Scan with your iPhone to install
I made this simple shortcut because it’s cool and I’m a beginner
What's New
Version 1.0
First release
What it does
17 actions-
Show Alert
-
Show Alert
-
Ask for InputPlace your bet!
-
Calculate
-
Ask for InputSelect a number in between 0-30
-
If
-
Stop This Shortcut
-
If
-
Show NotificationSelecting Random number...
-
Wait
-
Random Number
-
If
-
Show Alert
-
Stop This Shortcut
-
If
-
Show Alert
-
Show Alert
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#define color red
#define glyph dollarSign
confirm("Welcome to roulette!")
confirm("In this game you must bet any money on a number between 0-30, if it lands on your number your money you betted doubles.")
const ProvidedInput = prompt("Place your bet!", "Number")
const ProvidedInput1 = prompt("Select a number in between 0-30", "Number")
if ProvidedInput1 > 30 {
stop()
} else {
}
showNotification("Selecting Random number...")
wait(3)
const RandomNumber = randomNumber(0, 30)
if RandomNumber != ProvidedInput1 {
confirm("You lose!")
stop()
} else {
confirm("You win!")
}
confirm("You won {}$!")
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
You Might Also Like
Advertisement