ShareShortcuts

Guessing Game

Hello, this game Is an gussying game you have to know a number from 1 to 100

saif-munir
Bifurcar “Guessing Game”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que saif-munir reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
59K
Guardado
0
Acciones
30
Categoría
API
Versión
1.0
Idioma
EN

Hello, this game Is an gussying game you have to know a number from 1 to 100

Novedades

Versión 1.0

First release

Historial de versiones
1.0 15 de may. de 2020

First release

Qué hace

30 acciones
  1. Comment
    By Lim Thye Chean Guess a number between 1-100. This version uses speech for input.
  2. Text
  3. Get Text from Input
  4. Repeat
  5. Random Number
  6. Set Variable
    answer
  7. Repeat
  8. Text
  9. Speak Text
  10. Dictate Text
  11. Round Number
  12. If
  13. If
  14. Text
  15. Speak Text
  16. If
  17. Text
  18. Speak Text
  19. Show Result
  20. Stop This Shortcut
  21. If
  22. If
  23. Text
  24. Speak Text
  25. If
  26. Text
  27. Speak Text
  28. Text
  29. Speak Text
  30. Show Alert
    Guessing Game

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#include 'actions/text'
#define color red
#define glyph gameController

/*
By Lim Thye Chean

Guess a number between 1-100.
This version uses speech for input.
*/
const Text = "Guessing Game.\n\nThis game let you guess a number between 1 to 100.\nYou only have 10 chances."
getText(Text)

const IfResult = repeat _ for 100 {
	randomNumber(1, 100)
	@answer
	repeat _ for 10 {
		speak(, "en-US")
		const DictatedText = listen()
		const RoundedNumber = round(DictatedText)
		if RoundedNumber == @answer {
			if @RepeatIndex2 < 6 {
				speak(, "en-US")
			} else {
				speak(, "en-US")
			}
			show("You win!\nThe answer is {@answer}.")
			stop()
		} else {
			if RoundedNumber > @answer {
				speak(, "en-US")
			} else {
				speak(, "en-US")
			}
		}
	}
	speak(, "en-US")
	alert(, "Guessing Game")
}
Abrir en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

Más de saif-munir

Ver todo

También te puede gustar

Ver todo
Publicidad