ShareShortcuts

Rock Paper Scissors

Rock Paper Scissors!

theshortcutguy2
Fork “Rock Paper Scissors”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so theshortcutguy2 gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
38K
Saved
0
Actions
41
Category
Fun
Version
1.0
Language
EN

Rock Paper Scissors!

What's New

Version 1.0

First release

Version History
1.0 Sep 18, 2022

First release

What it does

41 actions
  1. List
  2. Get Item from List
  3. Ask for Input
    Enter “Rock” “Paper” or “Scissors”
  4. If
  5. If
  6. Show Alert
  7. If
  8. If
  9. Show Alert
  10. If
  11. If
  12. Show Alert
  13. If
  14. If
  15. If
  16. If
  17. Show Alert
  18. If
  19. If
  20. Show Alert
  21. If
  22. If
  23. Show Alert
  24. If
  25. If
  26. If
  27. If
  28. Show Alert
  29. If
  30. If
  31. Show Alert
  32. If
  33. If
  34. Show Alert
  35. If
  36. If
  37. Choose from Menu
    Play Again?
  38. Choose from Menu
    Yes
  39. Run Shortcut
    Rock Paper Scissors
  40. Choose from Menu
    No
  41. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#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()
}
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

More by theshortcutguy2

See All

You Might Also Like

See All
Advertisement