Poster un nouveau sujet Poster une réponse <<   Page: , , 3,      >>
Morpion & Puissance 4
Auteur Message
Ratuss



Autorisation : Membre
Nb de messages : 1561
Inscrit le : Mer 01 Mar 2006, 20:41
Posté le : Jeu 02 Nov 2006, 8:08   Citer 

Lol, t'étais pas obligé de le dire (purée c'est fou depuis que t'es modo j'ai même plus mes 1000 messages maxiangry.gif )

----------------------
--- LISTE DES JEUX POUR TI ---
 Adresse email Haut de page Bas de page 
 
Sangohan38



Autorisation : Membre
Nb de messages : 3370
Inscrit le : Sam 31 Déc 2005, 19:48
Posté le : Jeu 02 Nov 2006, 9:14   Citer 

Tu crois peut être que ça me fait plaisir de retomber a 978...
Mais en tant que modo je m'effoce de faire mon boulot.

Sangohan38

 Adresse email Haut de page Bas de page 
 
Sangohan38



Autorisation : Membre
Nb de messages : 3370
Inscrit le : Sam 31 Déc 2005, 19:48
Posté le : Dim 19 Nov 2006, 11:53   Citer 

Voici un nouveau Morpion que j'ai fait différamment:


Code
:1->Xmin
:95->Xmax
:0->Ymin
:AxesOff
:62->Ymax
:0->G
:ClrDraw
:For(A,33,63,10
:Line(A,18,A,48
:1->C
:End
:ClrList L1
:9->dim L1
:For(A,18,48,10
:Line(33,A,63,A
:End
:Lbl 0
:C->B
:0->[THETA]
:getKey->[THETA]
:If [THETA]=72 and L1(7)=0:B->L1(7)
:If [THETA]=73 and L1(8)=0:B->L1(8)
:If [THETA]=74 and L1(9)=0:B->L1(9)
:If [THETA]=82 and L1(4)=0:B->L1(4)
:If [THETA]=83 and L1(5)=0:B->L1(5)
:If [THETA]=84 and L1(6)=0:B->L1(6)
:If [THETA]=92 and L1(1)=0:B->L1(1)
:If [THETA]=93 and L1(2)=0:B->L1(2)
:If [THETA]=94 and L1(3)=0:B->L1(3)
:If [THETA][DIFFERENT DE]0:Goto 1
:Goto 0
:Lbl 1
:If L1(7)=1:Text(16,36,"X
:If L1(7)=.1:Text(16,36,"O
:If L1(8)=1:Text(16,46,"X
:If L1(8)=.1:Text(16,46,"O
:If L1(9)=1:Text(16,56,"X
:If L1(9)=.1:Text(16,56,"O
:If L1(4)=1:Text(26,36,"X
:If L1(4)=.1:Text(26,36,"O
:If L1(5)=1:Text(26,46,"X
:If L1(5)=.1:Text(26,46,"O
:If L1(6)=1:Text(26,56,"X
:If L1(6)=.1:Text(26,56,"O
:If L1(1)=1:Text(36,36,"X
:If L1(1)=.1:Text(36,36,"O
:If L1(2)=1:Text(36,46,"X
:If L1(2)=.1:Text(36,46,"O
:If L1(3)=1:Text(36,56,"X
:If L1(3)=.1:Text(36,56,"O
:0->F
:If L1(1)+L1(2)+L1(3)=3 or L1(1)+L1(2)+L1(3)=.3:1->F
:If L1(4)+L1(5)+L1(6)=3 or L1(4)+L1(5)+L1(6)=.3:2->F
:If L1(7)+L1(8)+L1(9)=3 or L1(7)+L1(8)+L1(9)=.3:3->F
:If L1(1)+L1(4)+L1(7)=3 or L1(1)+L1(4)+L1(7)=.3:4->F
:If L1(2)+L1(5)+L1(8)=3 or L1(2)+L1(5)+L1(8)=.3:5->F
:If L1(3)+L1(6)+L1(9)=3 or L1(3)+L1(6)+L1(9)=.3:6->F
:If L1(1)+L1(5)+L1(9)=3 or L1(1)+L1(5)+L1(9)=.3:7->F
:If L1(7)+L1(5)+L1(3)=3 or L1(7)+L1(5)+L1(3)=.3:8->F
:If L1(1)+L1(2)+L1(3)+L1(4)+L1(5)+L1(6)+L1(7)+L1(8)+L1(9)=5.4:1->G
:If F[DIFFERENT DE]0 or G=1:Goto [THETA]
:If B=1:.1->C
:If B=.1:1->C
:Goto 0
:Lbl [THETA]
:If F=1:Line(33,23,63,23
:If F=2:Line(33,33,63,33
:If F=3:Line(33,43,63,43
:If F=4:Line(38,18,38,48
:If F=5:Line(48,18,48,48
:If F=6:Line(58,18,58,48
:If F=7:Line(33,18,63,48
:If F=8:Line(33,48,63,18
:If G=1:F+1->F
:If G=1 and F[DIFFERENT DE]9:Goto [THETA]
:Pause
:ClrDraw
:ClrHome
:Output(1,1,"   



Et le lien:http://www.new-uploader.com/file/1263/MORPION.82p.html

 Adresse email Haut de page Bas de page 
 
Stupid



Autorisation : Membre
Nb de messages : 768
Inscrit le : Jeu 28 Sep 2006, 18:42
Posté le : Mer 30 Mai 2007, 17:37   Citer 

puissance 4 il est en réseau et y'a moyen de mettre un mode réseau?

 Adresse email Haut de page Bas de page 
 
Sangohan38



Autorisation : Membre
Nb de messages : 3370
Inscrit le : Sam 31 Déc 2005, 19:48
Posté le : Jeu 31 Mai 2007, 20:58   Citer 

Tu parle de ton puissance 41 je suppose...
Pour le mettre "en réseau", il faut tout simplement utiliser lesx instructions get et send.
Pour plus d'informations, direction le manuel.

Sangohan38

 Adresse email Haut de page Bas de page 
 
Stupid



Autorisation : Membre
Nb de messages : 768
Inscrit le : Jeu 28 Sep 2006, 18:42
Posté le : Jeu 31 Mai 2007, 21:00   Citer 

je l'ai lu le manuel masi j'arrive pas à en faire un systeme d'envoi/réception pendant un prog

je connait, les fonctions mais j'ai pas la,methode

 Adresse email Haut de page Bas de page 
 
Stupid



Autorisation : Membre
Nb de messages : 768
Inscrit le : Jeu 28 Sep 2006, 18:42
Posté le : Jeu 31 Mai 2007, 21:33   Citer 


Code
FullScreen
0=>Xmin
94=>Xmax
0=>Ymin
62=>Ymax
ClrDraw
CoordOff
QuadOff
AxesOff
Horizontal 0
Horizontal 62
Vertical 0
Vertical 94
For(A,1,07
Text(10,A," SANGOHAN38"
End
For(A,1,10
Text(A,53," PRESENTE:"
End
For(A,1,25
Text(32,A," PUISSANCE 4"
End
Text(52,27,"VERSION 1.0"
Pause
ClrDraw
Lbl 1
Menu("PUISSANCE 4","JOUER",2,"INSTRUCTIONS",3,"QUITTER",4)
Lbl 3
ClrDraw
Text(1,1,"LE BUT DE CE JEU EST "
Text(7,1,"D'ALINER 4 PIONTS SOIT"
Text(13,1,"EN LIGNE, SOIT EN COLONNE"
Text(19,1,"SOIT EN DIAGONALE."
Text(28,1,"POUR CHOISIR LA COLONNE,"
Text(34,1,"ON UTILISE LES FLECHES ET"
Text(40,1,"LA TOUCHE [2ND]."
Pause
Goto 1
Lbl 4
ClrHome
ClrDraw
Output(1,1,"          "
Stop
Lbl 2
ClrDraw
41=>A
EffListe L1
43=>dim(L1
Float
For(Q,10,50,8
Line(37,Q,93,Q
End
Line(37,2,93,2
For(Q,37,93,8
Line(Q,50,Q,2
End
Text(17,5,"JOUEUR"
(-)2=>Y
Lbl 5
1=>[THETA]
1=>B
Text(17,31,[THETA]
For(Z,8,-8,-16
For(W,52,55
Pt-off(A,52,A,55
End
End
Getkey=>C
If C=24:A-8=>A
If C=26:A+8=>A
If C[pas égal à]21
Goto 5
Lbl 7
2=>[THETA]
0.1=>B
Text(17,31,[THETA]
For(Z,8,-8,-16
For(W,52,55
Pt-off(A,52,A,55
Line(A,52,A,55
Getkey=>C
If C=24:A-8=>A
If C=26:A+8=>A
If C [pas égal à 21]:Goto 7
Lbl 6
If A=41:1=>Z
If A=49:7=>Z
If A=57:13=>Z
If A=65:19=>Z
If A=73:25=>Z
If A=81:31=>Z
If A=89:37=>Z
Goto 0
Lbl 0
Z+1=>Z
Y+8=>Y
If L1(Z)[différent de]0 et B=1:Goto 0
If L1(Z)[différent de]0 et B=0.1:Goto 0
If L1(Z)=0 et B=1:Goto 8
If L1(Z)=0 et B=0.1:Goto 9
Lbl 8
Circle(A,Y,3
1=>L1(Z)
(-)2=>Y
Goto 7
Lbl 9
Circle(A,Y,3
0.1=>L1(Z)
Line(A-3,Y,A+3,Y
Line(A,Y-3,A,Y+3
(-)2=>Y
Goto 5



j'ai viré quelques octets à la version de Sango, mais j'ai du mal à cerner sa composition

 Adresse email Haut de page Bas de page 
 
Sangohan38



Autorisation : Membre
Nb de messages : 3370
Inscrit le : Sam 31 Déc 2005, 19:48
Posté le : Ven 01 Jui 2007, 0:04   Citer 

Si je me souviens bien, il suffit de séléctionner la collonne en déplacant le curseur du haut et le rond s'affiche tout seul.
J'avais rajouté quelques touches pour la victoire ou le match nul car j'avais la flem de définir toutes les conditions de victoires.
J'oubliais de dire que ce prog utilise les listes.

Sangohan38

 Adresse email Haut de page Bas de page 
 
craminou



Autorisation : Membre
Nb de messages : 138
Inscrit le : Sam 15 Avr 2006, 11:31
Posté le : Dim 24 Jui 2007, 21:53   Citer 

mon morpion (puisque le cable marche , on en profite)


Code
0üXmin
94üXmax
1üXscl
0üYmin
62üYmax
1üYscl
8üXres
ClrHome
ClrDraw
int(rand*2+1)üQ
0üO
0üP
Lbl Z
ClrDraw
0üR
0üS
0üT
0üU
0üV
0üW
0üX
0üY
0üZ
Line(0,0,0,62
Line(23,0,23,62
Line(46,0,46,62
Line(68,0,68,62
Line(0,0,68,0
Line(0,22,68,22
Line(0,42,68,42
Line(0,62,68,62
Text(2,2,"1
Text(2,26,"2
Text(2,50,"3
Text(22,2,"4
Text(22,26,"5
Text(22,50,"6
Text(42,2,"7
Text(42,26,"8
Text(42,50,"9
Text(6,69,"JOUEUR
Text(12,69,"1=X
Text(18,69,"2=O
Text(0,69,"SIGNE
Text(24,69,"PARTIE
Text(30,69,"GAGNEE:
Text(36,69,"JOUEUR
Text(42,69,"1=",O
Text(48,69,"2=",P
Pause
If Q=3
Then
1üQ
End
If Q=1
Then
Output(1,1,"JOUEUR 1 COMMENCE
Pause
ClrHome
Goto A
End
If Q=2
Then
Output(1,1,"JOUEUR 2 COMMENCE
Pause
ClrHome
Goto B
End
Lbl A
Input "JOUEUR 1 ENTRE LE NUMERO DE LA CASE",A
If A=1 and R=0
Then
Goto 1
End
If A=2 and S=0
Then
Goto 2
End
If A=3 and T=0
Then
Goto 3
End
If A=4 and U=0
Then
Goto 4
End
If A=5 and V=0
Then
Goto 5
End
If A=6 and W=0
Then
Goto 6
End
If A=7 and X=0
Then
Goto 7
End
If A=8 and Y=0
Then
Goto 8
End
If A=9 and Z=0
Then
Goto 9
End
If Aø1 and Aø2 and Aø3 and Aø4 and Aø5 and Aø6 and Aø7 and Aø8 and Aø9
Then
ClrHome
Disp "CASE INEXISTANTE
Pause
ClrHome
Goto A
End
Goto 11
Lbl 1
Text(10,10,"X
1üR
Goto 10
Lbl 2
Text(10,40,"X
1üS
Goto 10
Lbl 3
Text(10,60,"X
1üT
Goto 10
Lbl 4
Text(30,10,"X
1üU
Goto 10
Lbl 5
Text(30,40,"X
1üV
Goto 10
Lbl 6
Text(30,60,"X
1üW
Goto 10
Lbl 7
Text(50,10,"X
1üX
Goto 10
Lbl 8
Text(50,40,"X
1üY
Goto 10
Lbl 9
Text(50,60,"X
1üZ
Goto 10
Lbl 11
ClrHome
Output(1,1,"CASE DEJA UTILISEE
Pause
ClrHome
Goto A
Lbl 10
Pause
If S=1 and R=1 and T=1
Then
Goto 12
End
If U=1 and W=1 and V=1
Then
Goto 12
End
If X=1 and Z=1 and Y=1
Then
Goto 12
End
If R=1 and X=1 and U=1
Then
Goto 12
End
If S=1 and Y=1 and V=1
Then
Goto 12
End
If T=1 and Z=1 and W=1
Then
Goto 12
End
If R=1 and Z=1 and V=1
Then
Goto 12
End
If T=1 and X=1 and V=1
Then
Goto 12
End
If Rø0 and Sø0 and Tø0 and Uø0 and Vø0 and Wø0 and Xø0 and Yø0 and Zø0
Then
Goto 40
End
Goto B
Lbl 12
ClrHome
Output(1,1,"JOUEUR 1 GAGNE!
Pause
ClrHome
2üQ
O+1üO
Goto Z
Lbl B
Input "JOUEUR 2 ENTRE LE NUMERO DE LA CASE",A
If A=1 and R=0
Then
Goto 21
End
If A=2 and S=0
Then
Goto 22
End
If A=3 and T=0
Then
Goto 23
End
If A=4 and U=0
Then
Goto 24
End
If A=5 and V=0
Then
Goto 25
End
If A=6 and W=0
Then
Goto 26
End
If A=7 and X=0
Then
Goto 27
End
If A=8 and Y=0
Then
Goto 28
End
If A=9 and Z=0
Then
Goto 29
End
If Aø1 and Aø2 and Aø3 and Aø4 and Aø5 and Aø6 and Aø7 and Aø8 and Aø9
Then
ClrHome
Disp "CASE INEXISTANTE
Pause
ClrHome
Goto B
End
Goto 31
Lbl 21
Text(10,10,"O
2üR
Goto 30
Lbl 22
Text(10,40,"O
2üS
Goto 30
Lbl 23
Text(10,60,"O
2üT
Goto 30
Lbl 24
Text(30,10,"O
2üU
Goto 30
Lbl 25
Text(30,40,"O
2üV
Goto 30
Lbl 26
Text(30,60,"O
2üW
Goto 30
Lbl 27
Text(50,10,"O
2üX
Goto 30
Lbl 28
Text(50,40,"O
2üY
Goto 30
Lbl 29
Text(50,60,"O
2üZ
Goto 30
Lbl 31
ClrHome
Output(1,1,"CASE DEJA UTILISEE
Pause
ClrHome
Goto B
Lbl 30
Pause
If S=2 and R=2 and T=2
Then
Goto 32
End
If U=2 and W=2 and V=2
Then
Goto 32
End
If X=2 and Z=2 and Y=2
Then
Goto 32
End
If R=2 and X=2 and U=2
Then
Goto 32
End
If S=2 and Y=2 and V=2
Then
Goto 32
End
If T=2 and Z=2 and W=2
Then
Goto 32
End
If R=2 and Z=2 and V=2
Then
Goto 32
End
If T=2 and X=2 and V=2
Then
Goto 32
End
If Rø0 and Sø0 and Tø0 and Uø0 and Vø0 and Wø0 and Xø0 and Yø0 and Zø0
Then
Goto 40
End
Goto A
Lbl 32
ClrHome
Output(1,1,"JOUEUR 2 GAGNE!
Pause
ClrHome
1üQ
P+1üP
Goto Z
Lbl 40
ClrHome
Output(1,1,"EGALITE
Pause
ClrHome
Goto Z



cupsmiley.gif

 Adresse email Haut de page Bas de page 
 
vibra



Autorisation : Membre
Nb de messages : 595
Inscrit le : Mer 04 Avr 2007, 13:29
Posté le : Dim 24 Jui 2007, 22:57   Citer 

T'as pas plus long ?? karate.gif
Sérieux ça sert à quoi de faire un morpion sur calculette alors qu'il suffit de tracer 4 lignes sur un bout de papier !! crazy.gif

----------------------
Vive la programmation et vive le vibraphone !!!
 Adresse email Haut de page Bas de page 
 
craminou



Autorisation : Membre
Nb de messages : 138
Inscrit le : Sam 15 Avr 2006, 11:31
Posté le : Dim 24 Jui 2007, 23:08   Citer 

et quand t'a plus de papier ?, tu fait comment ?, hein? hein??, hein????????,
et puis comme les regles sont maxi complique la caltos te dit qui a gagner... en plus elle compte les points !!!!! tu imagine !! c'est une merveille de la technologie !! un bijoux !! et attention , cerise sur le gateau .............................. elle te dit quel joueur doit commencer !!!!!!!!!!!!!!!!!!!!!!!!!

n'hesite plus , jette ton bout de papier ringard et profite de cette ofre exeptionelle de deux programmes pour le prix d'u....euh pardon , j'membale un peu laugh.gif laugh.gif laugh.gif

 Adresse email Haut de page Bas de page 
 
mad67



Autorisation : Membre
Nb de messages : 630
Inscrit le : Sam 23 Jui 2007, 14:05
Posté le : Lun 25 Jui 2007, 8:06   Citer 

oui bon il est parfait ce jeu juste long et un peu lent.

 Adresse email Haut de page Bas de page 
 
Sangohan38



Autorisation : Membre
Nb de messages : 3370
Inscrit le : Sam 31 Déc 2005, 19:48
Posté le : Lun 25 Jui 2007, 8:47   Citer 

Moyen de raccourcir ce prog et de l'accélérer:


Code
If Q=3
Then
1üQ
End



devient


Code
If Q=3
1üQ



Explication: Pas besoin de mettre Then/end quand une seule instruction suit la condition.

Sangohan38

 Adresse email Haut de page Bas de page 
 
mad67



Autorisation : Membre
Nb de messages : 630
Inscrit le : Sam 23 Jui 2007, 14:05
Posté le : Lun 25 Jui 2007, 11:41   Citer 

oui je l'avais pas vu sa.

 Adresse email Haut de page Bas de page 
 
Ratuss



Autorisation : Membre
Nb de messages : 1561
Inscrit le : Mer 01 Mar 2006, 20:41
Posté le : Jeu 28 Jui 2007, 2:22   Citer 

j'avais fais un test, si je me souviens bien ne pas mettre then+end étais non seulement + économe mais il y avait également un tout petit gain de temps (mais vraiment pas grand chose :p )

----------------------
--- LISTE DES JEUX POUR TI ---
 Adresse email Haut de page Bas de page 
 
Sangohan38



Autorisation : Membre
Nb de messages : 3370
Inscrit le : Sam 31 Déc 2005, 19:48
Posté le : Jeu 28 Jui 2007, 7:22   Citer 

Normal il y a deux instructions de moins.
Par contre mieux vaut éviter de mettre après le Then un Else sinon, ça ralentit condérablement.

Sangohan38

 Adresse email Haut de page Bas de page 
 
mad67



Autorisation : Membre
Nb de messages : 630
Inscrit le : Sam 23 Jui 2007, 14:05
Posté le : Jeu 28 Jui 2007, 8:55   Citer 

heureusement mais then peut eviter des labels qui ralentissent le jeu

 Adresse email Haut de page Bas de page 
 
vibra



Autorisation : Membre
Nb de messages : 595
Inscrit le : Mer 04 Avr 2007, 13:29
Posté le : Jeu 28 Jui 2007, 11:21   Citer 

Les labels ne ralentissent pas le jeu (selon Ratuss et Sango).

----------------------
Vive la programmation et vive le vibraphone !!!
 Adresse email Haut de page Bas de page 
 
Ratuss



Autorisation : Membre
Nb de messages : 1561
Inscrit le : Mer 01 Mar 2006, 20:41
Posté le : Jeu 28 Jui 2007, 12:02   Citer 

Selon Sango (moi je n'ai fais que repeter minied.gif )

----------------------
--- LISTE DES JEUX POUR TI ---
 Adresse email Haut de page Bas de page 
 
vibra



Autorisation : Membre
Nb de messages : 595
Inscrit le : Mer 04 Avr 2007, 13:29
Posté le : Jeu 28 Jui 2007, 14:07   Citer 

Moi aussi d'aillieurs !! ( minied.gif )

----------------------
Vive la programmation et vive le vibraphone !!!
 Adresse email Haut de page Bas de page 
 
Poster un nouveau sujet Poster une réponse <<   Page: , , 3,      >>





  Powered by Fire-Soft-Board v1.0.10 © 2004 - 2024 Groupe FSB
Page générée en 9 requêtes
BlackOne par Grimmlink