[83] Rock-Paper-Sizor
3 participants
Page 1 sur 1
[83] Rock-Paper-Sizor
C'est un magnifique pierre feuille ciseau que j'ai programmé en Anglais (Rock Paper Sizor ça fait plus classe que Pierre feuille ciseau [Vous devez être inscrit et connecté pour voir cette image]) avec mode IA et mode 2 joueurs, sauvegarde du nombre de victoire/défaite contre l'IA. A tester !!
- Prgm RPS (Anglais):
- Code:
Lbl 0
ClrHome
ClrDraw
AxesOff
2→dim(ʟRPS
0→Xmin
0→Ymin
94→Xmax
62→Ymax
DelVar JDelVar UDelVar V
Horizontal 57
Horizontal 49
Text(6,18,"ROCK-PAPER-SIZOR
Text(16,26,"1 PLAYER 2 PLAYER
Text(57,48,"BY METALLICA
Line(47,15,47,35
Line(47,15,93,15
Line(47,35,93,35
Line(93,15,93,35
Text(29,52,"VICTOIRE:",ʟRPS(1
Text(39,52,"DEFAITE:",ʟRPS(2
Text(22,4,"PLAY
Text(31,4,"RESET
Text(40,4,"QUIT
22→Y:Ans→X
Repeat K=105
getKey→K
If K
Text(Y,0,"
If K
Text(16,X,"
Y-9(K=25)+9(K=34→Y
X-33(K=24 and Xø22)+33(K=26 and Xø55→X
Y-27(Y=49)+27(Y=13→Y
Text(Y,0,">
Text(16,X,">
End
If X=55:1→J
If Y=22:Goto A
If Y=40:Goto B
Lbl R
DelVar ʟRPS
Goto 0
Lbl A
ClrDraw
If J:Then
Text(54,2,"VICTOIRE:",U
Text(54,52,"VICTOIRE:",V
End
Text(18,4,"ROCK
Text(30,4,"PAPER
Text(42,4,"SIZOR
Text(18,67,"ROCK
Text(30,67,"PAPER
Text(42,67,"SIZOR
Vertical 43
Vertical 49
18→Y
Repeat K=105
getKey→K
If K
Text(Y,0,"
Y-12(K=25)+12(K=34→Y
Y-36(Y=54)+36(Y=6→Y
Text(Y,0,">
End
If J
Text(Y,0,"
(Y-6)/12→C
If not(J:Then
randInt(1,3→D
Text(12D+6,90,"<
Else
18→Y
Repeat K=105
getKey→K
If K
Text(Y,90,"
Y-12(K=25)+12(K=34→Y
Y-36(Y=54)+36(Y=6→Y
Text(Y,90,"<
End
(Y-6)/12→D
End
For(A,0,44
Text(A,45,"T
End
For(A,0,38
Text(A,45,"H
End
For(A,0,32
Text(A,45,"G
End
For(A,0,26
Text(A,45,"I
End
For(A,0,20
Text(A,45,"F
End
For(A,0,200
End
If J:Then
If C=D
Text(2,30,"EGALITE
If C=1 and D=3 or C=2 and D=1 or C=3 and D=2:Then
Text(2,11,"GAGNE
Text(2,59,"PERDU
U+1→U
End
If C=1 and D=2 or C=2 and D=3 or C=3 and D=1:Then
Text(2,9,"PERDU
Text(2,62,"GAGNE
V+1→V
End
Pause
ClrDraw
Horizontal 0
Horizontal 1
Horizontal 2
Horizontal 3
Horizontal 4
Horizontal 62
Horizontal 61
Horizontal 60
Horizontal 59
Horizontal 58
Vertical 0
Vertical 1
Vertical 2
Vertical 3
Vertical 4
Vertical 94
Vertical 93
Vertical 92
Vertical 91
Vertical 90
Text(18,35,"RECOMMENCER ?
Text(28,34,"OUI NON
30→Y
Repeat K=105
getKey→K
If K
Text(28,Y,"
Y-16(K=24 and Yø30)+16(K=26 and Yø46→Y
Text(28,Y,">
End
If Y=46
Goto 0
Goto A
End
If not(J:Then
ClrDraw
Horizontal 0
Horizontal 1
Horizontal 2
Horizontal 3
Horizontal 4
Horizontal 62
Horizontal 61
Horizontal 60
Horizontal 59
Horizontal 58
Horizontal 42
Horizontal 34
Horizontal 22
Horizontal 14
Vertical 0
Vertical 1
Vertical 2
Vertical 3
Vertical 4
Vertical 94
Vertical 93
Vertical 92
Vertical 91
Vertical 90
If C=D
Text(21,30,"EGALITE
If C=1 and D=3 or C=2 and D=1 or C=3 and D=2
Then
1+ʟRPS(1→ʟRPS(1
Text(21,40,"GAGNE
End
If C=1 and D=2 or C=2 and D=3 or C=3 and D=1
Then
1+ʟRPS(2→ʟRPS(2
Text(21,40,"PERDU
End
Text(41,7,"VICTOIRE:",ʟRPS(1
Text(41,51,"DEFAITE:",ʟRPS(2
Pause
Goto 0
End
Lbl B
ClrDraw
DelVar ADelVar CDelVar DDelVar JDelVar KDelVar UDelVar VDelVar XDelVar Y
Output(1,1,"
- Prgm RPS (Français):
- Code:
Lbl 0
EffEcr
EffDessin
AxesNAff
2→dim(ʟRPS
0→Xmin
0→Ymin
94→Xmax
62→Ymax
EffVar JEffVarUEffVarV
Horizontale 57
Horizontale 49
Texte(6,18,"ROCK-PAPER-SIZOR
Texte(16,26,"1 PLAYER 2 PLAYER
Texte(57,48,"BY METALLICA
Ligne(47,15,47,35
Ligne(47,15,93,15
Ligne(47,35,93,35
Ligne(93,15,93,35
Texte(29,52,"VICTOIRE:",ʟRPS(1
Texte(39,52,"DEFAITE:",ʟRPS(2
Texte(22,4,"PLAY
Texte(31,4,"RESET
Texte(40,4,"QUIT
22→Y:Rép→X
Repeat K=105
codeTouche→K
If K
Texte(Y,0,"
If K
Texte(16,X,"
Y-9(K=25)+9(K=34→Y
X-33(K=24 et Xø22)+33(K=26 et Xø55→X
Y-27(Y=49)+27(Y=13→Y
Texte(Y,0,">
Texte(16,X,">
End
If X=105:1→J
If Y=22:Goto A
If Y=40:Goto B
Lbl R
EffVar ʟRPS
Goto 0
Lbl A
EffDessin
If J:Then
Texte(54,2,"VICTOIRE:",U
Texte(54,52,"VICTOIRE:",V
End
Texte(18,4,"ROCK
Texte(30,4,"PAPER
Texte(42,4,"SIZOR
Texte(18,67,"ROCK
Texte(30,67,"PAPER
Texte(42,67,"SIZOR
Verticale 43
Verticale 49
18→Y
Repeat K=105
CodeTouche→K
If K
Texte(Y,0,"
Y-12(K=25)+12(K=34→Y
Y-36(Y=54)+36(Y=6→Y
Texte(Y,0,">
End
If J
Texte(Y,0,"
(Y-6)/12→C
If non(J:Then
EntAleat(1,3→D
Texte(12D+6,90,"<
Else
18→Y
Repeat K=105
codeTouche→K
If K
Texte(Y,90,"
Y-12(K=25)+12(K=34→Y
Y-36(Y=54)+36(Y=6→Y
Texte(Y,90,"<
End
(Y-6)/12→D
End
For(A,0,44
Texte(A,45,"T
End
For(A,0,38
Texte(A,45,"H
End
For(A,0,32
Texte(A,45,"G
End
For(A,0,26
Texte(A,45,"I
End
For(A,0,20
Texte(A,45,"F
End
For(A,0,200
End
If J:Then
If C=D
Texte(2,30,"EGALITE
If C=1 et D=3 ou C=2 et D=1 ou C=3 et D=1
Then
Texte(2,11,"GAGNE
Texte(2,59,"PERDU
U+1→U
End
If C=1 et D=2 ou C=2 et D=3 ou C=1 et D=1:Then
Texte(2,9,"PERDU
Texte(2,62,"GAGNE
V+1→V
End
Pause
EffDessin
Horizontale 0
Horizontale 1
Horizontale 2
Horizontale 3
Horizontale 4
Horizontale 62
Horizontale 61
Horizontale 60
Horizontale 59
Horizontale 58
Verticale 0
Verticale 1
Verticale 2
Verticale 3
Verticale 4
Verticale 94
Verticale 93
Verticale 92
Verticale 91
Verticale 90
Texte(18,35,"RECOMMENCER ?
Texte(28,34,"OUI NON
30→Y
Repeat K=105
codeTouche→K
If K
Texte(28,Y,"
Y-16(K=24 et Yø30)+16(K=26 et Yø46→Y
Texte(28,Y,">
End
If Y=46
Goto 0
Goto A
End
If non(J:Then
EffDessin
Horizontale 0
Horizontale 1
Horizontale 2
Horizontale 3
Horizontale 4
Horizontale 62
Horizontale 61
Horizontale 60
Horizontale 59
Horizontale 58
Horizontale 42
Horizontale 34
Horizontale 22
Horizontale 14
Verticale 0
Verticale 1
Verticale 2
Verticale 3
Verticale 4
Verticale 94
Verticale 93
Verticale 92
Verticale 91
Verticale 90
If C=D
Texte(21,30,"EGALITE
If C=1 et D=3 ou C=2 et D=1 ou C=3 et D=2
Then
1+ʟRPS(1→ʟRPS(1
Texte(21,40,"GAGNE
End
If
C=1 et D=2 ou C=2 et D=3 ou C=3 et D=1
Then
1+ʟRPS(2→ʟRPS(2
Texte(21,40,"PERDU
End
Texte(41,7,"VICTOIRE:",ʟRPS(1
Texte(41,51,"DEFAITE:",ʟRPS(2
Pause
Goto 0
End
Lbl B
EffDessin
EffVar AEffVar CEffVar DEffVar
JEffVar KEffVar UEffVar VEffVar XEffVar Y
Output(1,1,"
Dernière édition par Metallica le Lun 23 Aoû - 9:01, édité 1 fois
Metallica- Or 4
- Sexe :
Age : 28
Messages : 926
Date d'inscription : 30/06/2010
Etudes : DUT Info
Points Forum : 17
Points Concours : 9
Langages :- - TI-Basic Z80
- - Axe Parser
- - TI-82 Stats.fr
- - TI-83+ SE
Re: [83] Rock-Paper-Sizor
énorme!!
je kiffe les trucs inutile dans ce genre!
surtout que y'a plus personne d'assez débile pour jouer encore avec moi à ce jeu xD
je kiffe les trucs inutile dans ce genre!
surtout que y'a plus personne d'assez débile pour jouer encore avec moi à ce jeu xD
persalteas- Platinum 2
- Sexe :
Age : 28
Messages : 2068
Date d'inscription : 30/06/2010
Etudes : PACES (médecine)
Points Forum : 114
Points Concours : 10
Langages :- - TI-Basic Z80
- - xLib
- - Grammer
- - TI-Basic Nspire
- - TI-82 Stats.fr
- - TI-83
- - TI-83+
- - TI-84+ SE
- - TI-86
- - TI-Nspire
- - TI-Nspire CX
- - Casio Collège
- - Casio Graph
Re: [83] Rock-Paper-Sizor
le jeu prend pas mal de mémoire pour ce que c'est mais il est très joli (Notamment le FIGHT qui descend lettre par lettre :D)
Metallica- Or 4
- Sexe :
Age : 28
Messages : 926
Date d'inscription : 30/06/2010
Etudes : DUT Info
Points Forum : 17
Points Concours : 9
Langages :- - TI-Basic Z80
- - Axe Parser
- - TI-82 Stats.fr
- - TI-83+ SE
Re: [83] Rock-Paper-Sizor
Programme ajouté au site: (Avec énormément de retard excuse-moi Metallica...)
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum