Un petit jeu (enfin de 1690 octets quand même^^) dans sa tout première version (Il n'y a pas encore de menu par exemple).
Il peut peut-être y avoir un petit bug, mais dans ce cas signalez le moi. J'ai en effet rarement rencontré autant de problèmes algorythmiques^^
Code
ClrHome
Disp "2nd= Horizontal ","ALPHA= Vertical ","","BUT DU JEU :","'CAPTURER' LES","BILLES SANS LES","ECRASER LE PLUS","RAPIDEMENT.
Repeat getKey
End
ClrHome
Disp"2nd = Horizontal ","[Alpha] = Vertical
Repeat getKey
End
ClrDraw
0 -> Ymin:94 -> Xmax
0 -> Xmin:62 -> Ymax
{47 -> [ 2nd + 1 ]
{31 -> [ 2nd + 2 ]
{3 -> [ 2nd + 3 ]
[ 2nd + 3 ] -> [ 2ND + 4 ]
1 -> N:0 -> U
31 -> B:47 -> A
For(J,0,6,6
For(I,J,J+2
Horizontal Ymax-I
Horizontal I
Vertical I
Vertical Xmax-I
End
End
Pt-On(4,4,3
Pt-On(90,58,3
Pt-On(4,58,3
Pt-On(90,4,3
0 -> Z
Repeat K=22 or not(N
[ 2nd + 1 ] -> [ 2ND + 5 ]:[ 2nd + 2 ] -> [ 2ND + 6 ]
[ 2nd + 1 ]+[ 2nd + 3 ] -> [ 2nd + 1 ]
[ 2nd + 2 ]+[ 2ND + 4 ] -> [ 2nd + 2 ]
For(I,1,N
If pxl-Test(62-[ 2nd + 2 ](I),[ 2nd + 1 ](I)+[ 2nd + 3 ](I
Then
-[ 2nd + 3 ](I -> [ 2nd + 3 ](I
If pxl-Test(62-[ 2nd + 2 ](I),[ 2nd + 1 ](I)+[ 2nd + 3 ](I
0 -> [ 2nd + 3 ](I
End
If pxl-Test(62-[ 2nd + 2 ](I)-[ 2ND + 4 ](I),[ 2nd + 1 ](I
Then
-[ 2ND + 4 ](I -> [ 2ND + 4 ](I
If pxl-Test(62-[ 2nd + 2 ](I)-[ 2ND + 4 ](I),[ 2nd + 1 ](I
0 -> [ 2ND + 4 ](I
End
If not([ 2nd + 3 ](I))not([ 2ND + 4 ](I:Then
For(J,0,3
ClrHome
DispGraph
End
Pt-Off([ 2nd + 1 ](I),[ 2nd + 2 ](I),2
For(J,I,N
If J-N:Then
[ 2nd + 1 ](J+1 -> [ 2nd + 1 ](J
[ 2nd + 2 ](J+1 -> [ 2nd + 2 ](J
[ 2nd + 3 ](J+1 -> [ 2nd + 3 ](J
[ 2ND + 4 ](J+1 -> [ 2ND + 4 ](J
[ 2ND + 5 ](J+1 -> [ 2ND + 5 ](J
[ 2ND + 6 ](J+1 -> [ 2ND + 6 ](J
End
End
N-1 -> N
End
Pt-Off([ 2ND + 5 ](I),[ 2ND + 6 ](I),2
Pt-On([ 2nd + 1 ](I),[ 2nd + 2 ](I),2
End
getKey -> K
A -> C:B -> D
3(K=26)+A-3(K=24 -> A
B+3((K=25)-(K=34 -> B
Pt-Off(C,4,2
Pt-On(A,4,2
Pt-Off(C,58,2
Pt-On(A,58,2
Pt-Off(4,D,2
Pt-On(4,B,2
Pt-Off(90,D,2
Pt-On(90,B,2
If K=31:Then
For(I,7,55
If pxl-Test(61-I,A) or pxl-Test(61-I,A+3) or pxl-Test(61-I,A-3
Then
0 -> K:0 -> L
For(J,1,N
If [ 2nd + 2 ](J) = I and A = [ 2nd + 1 ](J:J -> K
If [ 2nd + 1 ](J) + [ 2nd + 3](J) = A
Then
-[ 2nd + 3 ](J -> [ 2nd + 3 ](J
If pxl-Test(62-[ 2ND + 4 ](J)-[ 2nd + 2 ](J),[ 2nd + 1 ](J)+[ 2nd + 3 ](J
0 -> [ 2nd + 3 ](J
End
End
If K:Then
Pt-Off(A,I,2
If N=1:Stop
For(L,K,N
If L-N:Then
[ 2nd + 1 ](L+1 -> [ 2nd + 1 ](L
[ 2nd + 2 ](L+1 -> [ 2nd + 2 ](L
[ 2nd + 3 ](L+1 -> [ 2nd + 3 ](L
[ 2ND + 4 ](L+1 -> [ 2ND + 4 ](L
[ 2ND + 5 ](L+1 -> [ 2ND + 5 ](L
[ 2ND + 6 ](L+1 -> [ 2ND + 6 ](L
End
End
N-1 -> N
Z+1 -> Z
End
End
Pxl-On(61-I,A
End
End
If K=21:Then
For(I,7,87
If pxl-Test(62-B,I-1) or pxl-Test(62-B,I-1) or pxl-Test(62-B,I-1
Then
0 -> K:0 -> L
For(J,1,N
If [ 2nd + 2 ](J)=B and I=[ 2nd + 1 ](J:J -> K
If [ 2nd + 2 ](J)+[ 2ND + 4 ](J)=B
Then
-[ 2ND + 4 ](J -> [ 2ND + 4 ](J
If pxl-Test(62 - [ 2ND + 4 ](J) - [ 2nd + 2 ](J) , [ 2nd + 1 ](J) + [ 2nd + 3 ](J
0 -> [ 2ND + 4 ](J
End
End
If K:Then
Pt-Off(I,B,2
If N=1:Stop
For([ 2nd + 2 ]K,N
If L-N:Then
[ 2nd + 1 ](L+1 -> [ 2nd + 1 ](L
[ 2nd + 2 ](L+1 -> [ 2nd + 2 ](L
[ 2nd + 3 ](L+1 -> [ 2nd + 3 ](L
[ 2ND + 4 ](L+1 -> [ 2ND + 4 ](L
[ 2ND + 5 ](L+1 -> [ 2ND + 5 ](L
[ 2ND + 6 ](L+1 -> [ 2ND + 6 ](L
End
End
N-1 -> N
Z+1 -> Z
End
End
Pxl-On(62-B,I-1
End
End
If not(fPart(U/50:Then
1+int(Nrand -> E
N+1 -> N
N -> dim([ 2nd + 1 ]
N -> dim([ 2nd + 2 ]
N -> dim([ 2ND + 4 ]
N -> dim([ 2nd + 3 ]
0 -> S
Repeat not(pxl-Test(62- [ 2nd + 2 ](N) - [ 2ND + 4 ](N) , [ 2nd + 1 ](N) + [ 2nd + 3 ](N
S+[ 2nd + 1 ](E -> [ 2nd + 1 ](N
S+[ 2nd + 2 ](E -> [ 2nd + 2 ](N
-[ 2nd + 3 ](E -> [ 2nd + 3 ](N
-[ 2ND + 4 ](E -> [ 2ND + 4 ](N
[ 2ND + 5 ](E -> [ 2ND + 5 ](N
[ 2ND + 6 ](E -> [ 2ND + 6 ](N
S+3 -> S
End
End
U+1 -> U
Text(1,1,U
Text(56,89,Z
End
If not(N:Then
Disp "TEMPS :",U,"PENALITE(s) :",50Z,"SCORE TOTAL :",U+50Z
{1,2 -> dim([D]
If U+50Z<[D](1,2
Then
Disp "RECCORD BATTU !
U+50Z -> [D](1,2
Else
Disp "RECCORD :
Output(7,10,[D](1,2
End
0 -> dim([ 2nd + 1 ]
0 -> dim([ 2nd + 2 ]
0 -> dim([ 2nd + 3 ]
0 -> dim([ 2ND + 4 ]
0 -> dim([ 2ND + 5 ]
0 -> dim([ 2ND + 6 ]