ShareShortcuts

Rock Paper Scissors

You know what it is…

beastbeats
„Rock Paper Scissors“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit beastbeats die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
32K
Gesichert
1
Aktionen
90
Kategorie
Fun
Version
1.0
Sprache
EN

You know what it is…

Neue Funktionen

Version 1.0

First release

Versionsverlauf
1.0 15. Jun 2023

First release

Was er macht

90 Aktionen
  1. Show Alert
    ❌ Rock Paper Scissors ❌
  2. Get File
  3. If
  4. Number
  5. Set Variable
    Derrotas
  6. Set Variable
    Victorias
  7. Set Variable
    Empates
  8. Dictionary
  9. Set Variable
    WLT
  10. Append to Text File
  11. Save File
  12. If
  13. Repeat
  14. Get File
  15. Get Dictionary from Input
  16. Get Dictionary Value
  17. Set Variable
    Victorias
  18. Get Dictionary Value
  19. Set Variable
    Derrotas
  20. Get Dictionary Value
  21. Set Variable
    Empates
  22. Choose from Menu
    Pick up one
  23. Choose from Menu
    Rock 🗿
  24. Random Number
  25. Set Variable
    Piedra
  26. If
  27. If
  28. Show Alert
    You won!
  29. Calculate
  30. Set Variable
    Victorias
  31. If
  32. Show Alert
    You lost!
  33. Calculate
  34. Set Variable
    Derrotas
  35. If
  36. Show Alert
    Tie!
  37. Calculate
  38. Set Variable
    Empates
  39. Choose from Menu
    Paper 📄
  40. Random Number
  41. If
  42. If
  43. Show Alert
    You lost!
  44. Calculate
  45. Set Variable
    Derrotas
  46. If
  47. Show Alert
    Tie!
  48. Calculate
  49. Set Variable
    Empates
  50. If
  51. Show Alert
    You won!
  52. Calculate
  53. Set Variable
    Victorias
  54. Choose from Menu
    Scissors ✂️
  55. Random Number
  56. If
  57. If
  58. Show Alert
    Tie!
  59. Calculate
  60. Set Variable
    Empates
  61. If
  62. Show Alert
    You won!
  63. Calculate
  64. Set Variable
    Victorias
  65. If
  66. Show Alert
    You lost!
  67. Calculate
  68. Set Variable
    Derrotas
  69. Choose from Menu
    - Stats -
  70. Calculate
  71. Round Number
  72. Set Variable
    WL
  73. Choose from Menu
  74. Choose from Menu
    Wins - Victorias
  75. Nothing
  76. Choose from Menu
    Losses - Derrotas
  77. Nothing
  78. Choose from Menu
    Ties - Empates
  79. Nothing
  80. Choose from Menu
    W / L ratio - WL
  81. Choose from Menu
    Reset Stats
  82. Choose from Menu
    Are you sure you want to reset your stats?
  83. Choose from Menu
    Yes
  84. Number
  85. Set Variable
    Victorias
  86. Set Variable
    Derrotas
  87. Set Variable
    Empates
  88. Choose from Menu
    No
  89. Dictionary
  90. Save File

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#include 'actions/math'
#include 'actions/documents'
#define color violet
#define glyph gameController

alert("By BeastBeasts", "❌ Rock Paper Scissors ❌")
const Archivo = getFileFromFolder(, "PPTstats.json", false)

if !Archivo {
	@Derrotas = 0
	@Victorias
	@Empates
	@WLT = {
		"Loses_Count": "{@Derrotas}",
		"Ties_Count": "{@Empates}",
		"Wins_Count": "{@Victorias}"
	}
	appendToFile("PPTstats.json", @WLT)
	saveFile("PPTstats.json", nil, true)
} else {
}

repeat _ for 111 {
	const Archivo1 = getFile("PPTstats.json", false)
	const Diccionario = getDictionary(Archivo1)
	@Victorias = Diccionario['Wins_Count']
	@Derrotas = Diccionario['Loses_Count']
	@Empates = Diccionario['Ties_Count']
	menu "Pick up one" {
	item "Rock 🗿":
		randomNumber(1, 3)
		@Piedra
		if @Piedra >= 2 {
			if @Piedra == 3 {
				alert("Rock - Scissors", "You won!")
				@Victorias = @Victorias + 1
			} else {
				alert("Rock - Paper", "You lost!")
				@Derrotas = @Derrotas + 1
			}
		} else {
			alert("Rock - Rock", "Tie!")
			@Empates = @Empates + 1
		}
	item "Paper 📄":
		const NmeroAleatorio = randomNumber(1, 3)
		if NmeroAleatorio >= 2 {
			if NmeroAleatorio == 3 {
				alert("Paper - Scissors", "You lost!")
				@Derrotas = @Derrotas + 1
			} else {
				alert("Paper - Paper", "Tie!")
				@Empates = @Empates + 1
			}
		} else {
			alert("Paper - Rock", "You won!")
			@Victorias = @Victorias + 1
		}
	item "Scissors ✂️":
		const NmeroAleatorio1 = randomNumber(1, 3)
		if NmeroAleatorio1 >= 2 {
			if NmeroAleatorio1 == 3 {
				alert("Scissors - Scissors", "Tie!")
				@Empates = @Empates + 1
			} else {
				alert("Scissors - Paper", "You won!")
				@Victorias = @Victorias + 1
			}
		} else {
			alert("Scissors - Rock", "You lost!")
			@Derrotas = @Derrotas + 1
		}
	item "- Stats -":
		const ResultadoDelClculo = @Victorias / @Derrotas
		ceil(ResultadoDelClculo, "Hundredths")
		@WL
		menu "" {
		item "Wins - {@Victorias}":
			nothing()
		item "Losses - {@Derrotas}":
			nothing()
		item "Ties - {@Empates}":
			nothing()
		item "W / L ratio - {@WL}":
		item :
			menu "Are you sure you want to reset your stats?" {
			item "Yes":
				@Victorias = 0
				@Derrotas
				@Empates
			item "No":
			}
		}
	}
	const Diccionario1 = {
		"Loses_Count": "{@Derrotas}",
		"Ties_Count": "{@Empates}",
		"Wins_Count": "{@Victorias}"
	}
	saveFile("PPTstats.json", Diccionario1, true)
}
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 beastbeats

Alle anzeigen

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung