Mit dem iPhone scannen, um zu installieren
Rock Paper Scissors!
Neue Funktionen
Version 1.0
First release
Was er macht
41 Aktionen-
List
-
Get Item from List
-
Ask for InputEnter “Rock” “Paper” or “Scissors”
-
If
-
If
-
Show Alert
-
If
-
If
-
Show Alert
-
If
-
If
-
Show Alert
-
If
-
If
-
If
-
If
-
Show Alert
-
If
-
If
-
Show Alert
-
If
-
If
-
Show Alert
-
If
-
If
-
If
-
If
-
Show Alert
-
If
-
If
-
Show Alert
-
If
-
If
-
Show Alert
-
If
-
If
-
Choose from MenuPlay Again?
-
Choose from MenuYes
-
Run ShortcutRock Paper Scissors
-
Choose from MenuNo
-
Stop This Shortcut
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#define glyph hand
const List = list("Rock ", "Paper", "Scissors")
const ItemFromList = getRandomItem(List)
const ProvidedInput = prompt("Enter “Rock” “Paper” or “Scissors”", "Text")
if ProvidedInput == "Rock" {
if ItemFromList == "Rock " {
confirm("Draw")
} else {
if ItemFromList == "Scissors" {
confirm("You Lose.")
} else {
if ItemFromList == "Paper" {
confirm("You Win!")
} else {
}
}
}
} else {
if ProvidedInput == "Paper" {
if ItemFromList == "Rock" {
confirm("You Win!")
} else {
if ItemFromList == "Paper" {
confirm("Draw.")
} else {
if ItemFromList == "Scissors" {
confirm("You Lose.")
} else {
}
}
}
} else {
if ProvidedInput == "Scissors" {
if ItemFromList == "Scissors" {
confirm("Draw")
} else {
if ItemFromList == "Rock" {
confirm("You Lose.")
} else {
if ItemFromList == "Paper" {
confirm("You Win!")
} else {
}
}
}
} else {
}
}
}
menu "Play Again?" {
item "Yes":
runSelf()
item "No":
stop()
}
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von theshortcutguy2
Das gefällt dir vielleicht auch
Werbung