Scan med din iPhone for at installere
Rock Paper Scissors!
Nyheder
Version 1.0
First release
Hvad den gør
41 handlinger-
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
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#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()
}
Åbn i Cherri Playground
Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.
Bedømmelser og anmeldelser
Skriv en anmeldelse–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Ingen anmeldelser endnu. Vær den første!
Annonce
Mere fra theshortcutguy2
Du vil måske også kunne lide
Annonce