Bonsoir à tous,
Je suis un nouveau sur votre forum et j'ai actuellement un problème avec le Morpion 3D de persalteas .
J'ai un problème pour ces 2 lignes sur lesquels ma calculatrice s'arrête:
:Ans→L1
:abs(sum(∆List(L1→L
Des idées ? Merci !
Je suis un nouveau sur votre forum et j'ai actuellement un problème avec le Morpion 3D de persalteas .
J'ai un problème pour ces 2 lignes sur lesquels ma calculatrice s'arrête:
:Ans→L1
:abs(sum(∆List(L1→L
Des idées ? Merci !
- Code:
FnOff
:AxesOff
:0→Xmin:94→Xmax
:0→Ymin:62→Ymax
:ClrDraw
:Horizontal 0
:Vertical 0
:Horizontal 62
:Vertical 94
:Vertical 1
:Vertical 93
:Line(0,60,20,60
:Line(74,35,94,35
:" M o r p i o n→Str1
:For(A,1,94,2
: Pt-Off(A,60
: Pt-Off(A+1,60
: Pt-Off(94-A,35
: Pt-Off(95-A,35
: Pt-On(A+20,60
: Pt-On(A+21,60
: Pt-On(74-A,35
: Pt-On(75-A,35
: If A<8:Then
: For(B,0,2
: Text(‾1,4,4A+25+B,sub(Str1,A,1
: End
: End
: If A>7 and A<23:Then
: For(B,0,2
: Text(‾1,14,4A+B-18,sub(Str1,A,1
: End
: End
: If A=75:Text(54,20,"(c) persalteas
:End
:Horizontal 60
:Horizontal 35
:Horizontal 34
:Line(8,9,86,9
:Line(8,28,86,28:Line(86,9,86,28
:Line(8,9,8,28
:Pt-On(20,14,2
:Pt-On(20,23,2
:Text(36,26,"Joueur / Joueur
:Text(44,26,"Joueur / TI
:23→C
:Repeat K=105
: getKey→K
: Pt-Off(20,C
: C+9(K=25 and C=14)-9(K=34 and C=23→C
: Pt-On(20,C
: 69!:69!:69!
:End
:If C=14:1→W
:If C=23:0→W
:0→S:0→R
:1→P:0→V
:Lbl Z
:0→Y
:ClrDraw
:If not(V:Then
: For(C,1,12
: If C=1:{3,42,21,42,21,58,24,58,24,42,41,42,41,58,44,58,44,42,62,42
: If C=2:{62,42,62,39,44,39,44,22,62,22,62,19,44,19,44,2,41,2,41,19,24,19
: If C=3:{24,19,24,2,21,2,21,19,3,19,3,22,21,22,21,39,3,39,3,42
: If C=4:{24,39,41,39,41,22,24,22,24,39
: If C=5:{3,42,5,44,21,44
: If C=6:{3,22,5,24,20,24
: If C=7:{24,2,26,4,26,19
: If C=8:{44,2,46,4,46,18
: If C=9:{26,39,26,24,41,24
: If C=10:{46,39,46,24,64,24,64,21,62,19
: If C=11:{41,58,43,60,46,60,46,44,64,44,64,41,62,39
: If C=12:{21,58,23,60,26,60,26,44,40,44
: For(D,1,dim(Ans)-3,2
: Line(Ans(D),Ans(D+1),Ans(D+2),Ans(D+3
: End
: End
: {25,59,45,59,25,43,45,43,63,43,25,23,45,23,63,23
: For(D,1,16,2
: Pt-On(Ans(D),Ans(D+1
: End
: {67,9,67,52,69,54,93,54,93,11,91,9,91,52,92,53
: For(C,1,13,2
: Line(Ans(C),Ans(C+1),Ans(C+2),Ans(C+3
: End
: {52,37,27,23,13,9
: For(C,1,6
: Line(67,Ans(C),91,Ans(C
: End
: Text(11,69,"Partiexp
: Text(26,69,"J1.
: If not(W:Text(40,69,"J2.
: If W:Text(40,69,"TI.
: StorePic 6
: 1→V
:Else
: RecallPic 6
:End
:Text(17,75,P
:Text(27,80,S
:Text(41,80,R
:1→C:1→D
:2→A:2→B
:0→T
:If fPart(P.5:1→T
:{3,3→dim([A]
:Fill(0,[A]
:Repeat 0
: getKey→K
:
: A→C
: B→D
:
: If T or not(W:Then
: B-(K=24)+(K=26→B
: A-(K=34)+(K=25→A
: End
: If not(A:3→A
: If A=4:1→A
: If not(B:3→B
: If B=4:1→B
: Line(69,29,77,29,T
: Line(69,15,77,15,not(T
: Pt-Off(20D-7,20C-9,3
: If T or not(W:Pt-On(20B-7,20A-9,3
: If Wnot(T:Then
: Matr►list([A],L1,L2,L3
: Matr►list([A]T,L4,L5,L6
: 0→M:0→N
: For(K,1,6
: If K=1:L1
: If K=2:L2
: If K=3:L3
: If K=4:L4
: If K=5:L5
: If K=6:L6
: Ans→L1
: abs(sum(∆List(L1→L
: If (sum(L1)=4 and L=2) or (sum(L1)=2 and (L=1 or not(L:Then
: For(J,1,3
: If not(L1(J:J→N
: End
: 1→M
: If K<4:Then
: K→B
: N→A
: Else
: K-3→A
: N→B
: End
: End
: If sum(L1)=4 and L=2:7→K
: End
: If not(M:Then
: Lbl V
: randInt(1,3→A
: randInt(1,3→B
: If [A](A,B:Goto V
: End
: 105→K
: End
: If K=45:Goto Q
: If K=105 and [A](A,B:0→K
: If K=105 and T:Then
: 1→[A](A,B
: 20A-13→C
: 20B-13→D
: For(J,1,4
: If J=1:{4,4,0,0,3,0,6,3,9,0,12,0,8,4
: If J=2:{4,5,0,9,3,9,6,6,9,9,12,9,8,5
: If J=3:{1,10,4,10,6,8
: For(L,1,dim(Ans)-3,2
: Line(D+Ans(L),C+Ans(L+1),D+Ans(L+2),C+Ans(L+3
: End:End
: Line(D+9,C+5,D+13,C+1
: Line(D+10,C+10,D+13,C+10
: End
: If K=105 and not(T:Then
: 20A-15→C
: 20B-14→D
: Circle(D+7,C+7,5,{/i/
: Circle(D+6,C+6,5,{/i/
: Circle(D+6,C+6,3,{/i/
: Line(D+7,C+2,D+5,C+2,0
: Line(D+2,C+5,D+2,C+8,0
: 2→[A](A,B
: End
: If K=105:not(T→T
: [A](1,1→J
: [A](1,2→K
: [A](1,3→L
: [A](2,1→M
: [A](2,2→E
: [A](2,3→F
: [A](3,1→G
: [A](3,2→H
: [A](3,3→I
: If JKL=1 or MEF=1 or GHI=1 or JMG=1 or KEH=1 or LFI=1 or JEI=1 or LEG=1:Then
: Line(0,11,94,11
: For(K,12,50
: Line(0,K,94,K,0
: End
: Line(0,50,94,50
: Text(28,20,"Joueur 1 gagne!
: P+1→P
: S+1→S
: 1→Y
: Pause
: End
: If JKL=8 or MEF=8 or GHI=8 or JMG=8 or KEH=8 or LFI=8 or JEI=8 or LEG=8:Then
: Line(0,11,94,11
: For(K,12,50
: Line(0,K,94,K,0
: End
: Line(0,50,94,50
: If not(W:Text(28,20,"Joueur 2 gagne!
: If W:Then
: Text(24,15,"Comme quoi une TI
: Text(31,11,"vaut bien un cerveau
: Text(38,30,"humain !
: End
: P+1→P
: R+1→R
: 1→Y
: Pause
: End
: If J+K+L+M+E+F+G+H+I≥13 and not(Y:Then
: Line(0,11,94,11
: For(K,12,50
: Line(0,K,94,K,0
: End
: Line(0,50,94,50
: Text(28,32,"Failed =P
: P+1→P
: 1→Y
: Pause
: End
: If Y:Goto Z
:End
:Lbl Q
:ClrDraw
:ClrHome
:ZStandard
:AxesOn
:DelVar [A]DelVar Pic6DelVar L1DelVar L2DelVar L3DelVar L4DelVar L5DelVar L6
:Output(1,1," Morpion-3D by persalteas.