ShareShortcuts

Rock Paper Scissors

You know what it is…

beastbeats
Fork “Rock Paper Scissors”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så beastbeats får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
32K
Gemt
1
Handlinger
90
Kategori
Sjov
Version
1.0
Sprog
EN

You know what it is…

Nyheder

Version 1.0

First release

Versionshistorik
1.0 15. jun. 2023

First release

Hvad den gør

90 handlinger
  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

Vis som kode
Beta

Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.

#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)
}
Å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 beastbeats

Se alle

Du vil måske også kunne lide

Se alle
Annonce