Algo Jaken
La version complète du jeu est disponible ici :
http://www.angelfire.com/blog/gya/Jaken.7z
Vous pouvez également consulter le code source sur Csharpfr.com
http://www.csharpfr.com/codes/JEU-PIERRE-FEUILLE-CISEAUX-JANKENPON_34692.aspx
Variables
scor, scor2, choix : entierstexte, choix2 : caractères
DEBUT
Afficher "Jeu de Jaken"
Afficher "Licence publique générale GNU"
scor <- 0
scor2 <- 0
choix <- 0
choix2 <- "pierre"
Répéter
Afficher " "
Répéter
Afficher "pierre, papier ou ciseau?"
Saisir texte
Jusqu'à texte="pierre" ou texte="papier" ou texte="ciseau"
si texte = "pierre" alors
choix <- 0
finsi
si texte = "papier" alors
choix <- 1
finsi
si texte = "ciseau" alors
choix <- 2
finsi
Afficher " "
Afficher "joueur1: ", texte
nb <- aléatoire(2)
si nb = 0 alors
choix2 <- "pierre"
finsi
si nb = 1 alors
choix2 <- "papier"
finsi
si nb = 2 alors
choix2 <- "ciseau"
finsi
Afficher "joueur2: ", choix2
Afficher " "
si choix=0 et nb=0 alors
Afficher "Partie Nulle."
sinon
si choix=0 et nb=1 alors
Afficher "Le papier recouvre la pierre."
scor2 <- scor2 + 1
sinon
si choix=0 et nb=2 alors
Afficher "La pierre casse les ciseaux."
scor <- scor + 1
finsi
finsi
finsi
si choix=1 et nb=0 alors
Afficher "Le papier enveloppe la pierre."
scor <- scor + 1
sinon
si choix=1 et nb=1 alors
Afficher "Partie Nulle."
sinon
si choix=1 et nb=2 alors
Afficher "Le ciseau coupe le papier."
scor2 <- scor2 + 1
finsi
finsi
finsi
si choix=2 et nb=0 alors
Afficher "La pierre casse le ciseau."
scor2 <- scor2 + 1
sinon
si choix=2 et nb=1 alors
Afficher "Le ciseau coupe le papier."
scor <- scor + 1
sinon
si choix=2 et nb=2 alors
Afficher "Partie Nulle."
finsi
finsi
finsi
Afficher " "
Afficher "Les scores sont :"
Afficher "Joueur1 : ", scor
Afficher "Joueur2 : ", scor2
Afficher " "
Répéter
Afficher "Encore une partie?(O/N)"
Saisir texte
texte <- agrandir(texte)
Jusqu'à texte="N" ou texte="O"
jusqu'à texte="N"
FIN
Vous devez être connecté pour poster un commentaire.