Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Chronomètre :
- ("Spécification : 1.3")
- Espèces :
- l'espèce chronomètre hérite de entité
- Principal :
- Rôles :
- temps est un chronomètre
- _seconde & _minute & _heure est un nombre
- reponse est un texte
- Actions :
- attache _seconde à temps
- attache _minute à temps
- attache _heure à temps
- attache stop à temps
- attache start à temps
- ("Chronomètre :")
- évoque temps.start()
- questionne reponse sur "Quel est ton prénom ?"
- "Le temps écoulé, " + reponse + ", est de " + temps.stop() + " secondes." !
- termine
- Start :
- Rôles :
- *moi est un chronomètre
- Actions :
- _seconde@moi vaut seconde
- _minute@moi vaut minute
- _heure@moi vaut heure
- retourne 0
- stop :
- Rôles :
- *moi est un chronomètre
- §tmp_seconde est un nombre valant seconde
- §tmp_minute est un nombre valant minute
- §tmp_heure est un nombre valant heure
- Actions :
- retourne tmp_heure * 3600 + tmp_minute * 60 + tmp_seconde - (_heure@moi * 3600 + _minute@moi * 60 + _seconde@moi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement