Guessing Game
Hello, this game Is an gussying game you have to know a number from 1 to 100
saif-munirScanne avec ton iPhone pour installer
Hello, this game Is an gussying game you have to know a number from 1 to 100
Nouveautés
Version 1.0
First release
Ce qu’il fait
30 actions-
CommentBy Lim Thye Chean Guess a number between 1-100. This version uses speech for input.
-
Text
-
Get Text from Input
-
Repeat
-
Random Number
-
Set Variableanswer
-
Repeat
-
Text
-
Speak Text
-
Dictate Text
-
Round Number
-
If
-
If
-
Text
-
Speak Text
-
If
-
Text
-
Speak Text
-
Show Result
-
Stop This Shortcut
-
If
-
If
-
Text
-
Speak Text
-
If
-
Text
-
Speak Text
-
Text
-
Speak Text
-
Show AlertGuessing Game
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#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")
}
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Plus de saif-munir
Ça pourrait aussi te plaire
Publicité