jjn4
Nombre de messages : 2747 Date d'inscription : 13/09/2009
| Sujet: +++ Ven 24 Déc 2010 - 11:14 | |
| Idem, moi aussi, je vous souhaite un joyeux Noël ! Mais, bonnes habitudes obligent, je vous le souhaite avec un programme. - Code:
-
rem ' Guirlande-Noël dim a$ , c , h , i , j , k , n , x , y , p(150) , r(150) label bleu , bouton , jaune , noel , orange , rose label rouge , pomme , tous , va , vert , violet , zut rem datas data 127,1,128,2,129,2,130,2,131,3,133,3,134,4,135,4,136,4,137,5 data 139,5,140,6,142,6,144,7,147,7,148,8,149,8,150,8,151,2,152,2 data 153,2,154,4,89,2,91,2,158,1,159,2,161,2,162,3,164,3,165,4 data 168,5,170,5,171,6,173,6,175,7,178,7,179,8,181,8,182,2,185,4 data 189,1,190,2,192,2,193,3,194,3,195,3,196,4,199,5,201,5,202,6 data 203,6,204,6,206,7,207,7,209,7,210,8,212,8,213,2,216,4,220,1 data 221,2,223,2,225,3,227,4,228,4,230,5,232,5,234,6,237,7,238,7 data 240,7,241,8,243,8,244,2,245,2,247,4,251,1,252,2,254,2,256,3 data 258,4,261,5,263,5,265,6,268,7,270,7,271,7,272,8,274,8,275,2 data 278,4,282,1,283,2,285,2,287,3,289,4,292,5,294,5,295,6,296,6 data 297,6,299,7,301,7,302,7,303,8,305,8,306,2,309,4,311,1,313,1 data 314,2,316,2,318,3,320,4,323,5,325,5,326,6,328,6,330,7,333,7 data 334,8,336,8,337,2,340,4,342,1,343,1,344,1,345,2,346,2,347,2 data 349,3,351,4,352,4,353,4,354,5,355,5,356,5,357,6,359,6,361,7 data 364,7,365,8,366,8,367,8,368,2,369,2,370,2,371,4,372,4,0,0 repeat n=n+1 read p(n) read r(n) until p(n)=0 n=n-1
rem form0 width 0,1020 height 0,550 a$=" G U I R L A N D E S D E N O Ë L - " a$=a$+"Cliquez sur le bord beige de l'écran pour arrêter" caption 0,a$
for i=0 to 14 for k=1 to 31 picture k+i*31 width k+i*31,26 left k+i*31,(k-1)*31+4 height k+i*31,26 top k+i*31,i*31+4 color k+i*31,236,233,216 2d_target_is k+i*31 gosub bouton next k next i wait 800
for i=1 to 200 for k=1 to 199 x=int(rnd(31)) y=int(rnd(15))+1 c=int(rnd(8))+1 2d_target_is y+x*15 select c case 1 : gosub vert case 2 : gosub orange case 3 : gosub violet case 4 : gosub bleu case 5 : gosub rouge case 6 : gosub jaune case 7 : gosub rose case 8 : gosub pomme end_select next k midi_on midi_play int(rnd(25))+69,7 midi_off if clicked(0)=1 then goto zut wait 1 for k=1 to 465 2d_target_is k gosub bouton next k if clicked(0)=1 then goto zut if i/4=int(i/4) then gosub noel if i/3=int(i/3) then gosub tous if i/5=int(i/5) then gosub va next i
end
bleu: for j=13 to 1 step -1 2d_pen_color 0,255-7*j,255 2d_fill_color 0,255-7*j,255 2d_circle 13,13,j next j return
bouton: for j=13 to 1 step -1 2d_pen_color 255-5*j,255-5*j,255-5*j 2d_fill_color 255-5*j,255-5*j,255-5*j 2d_circle 13,13,j next j return
jaune: for j=13 to 1 step -1 2d_pen_color 255-4*(j-1),255-4*(j-1),0 2d_fill_color 255-4*(j-1),255-4*(j-1),0 2d_circle 13,13,j next j return
noel: for k=1 to n 2d_target_is p(k) select r(k) case 1 : gosub vert case 2 : gosub orange case 3 : gosub violet case 4 : gosub bleu case 5 : gosub rouge case 6 : gosub jaune case 7 : gosub rose case 8 : gosub pomme end_select next k midi_on midi_play 62,6 midi_play 67,9 midi_play 67,11 midi_play 67,6 midi_play 69,6 midi_play 71,9 midi_play 71,11 midi_play 71,6 midi_play 67,6 midi_play 69,8 midi_play 71,8 midi_play 72,6 midi_play 66,6 midi_play 69,6 midi_play 67,6 midi_off if clicked(0)=1 then goto zut for k=1 to 465 2d_target_is k gosub bouton next k return
orange: for j=13 to 1 step -1 2d_pen_color 255,255-7*j,0 2d_fill_color 255,255-7*j,0 2d_circle 13,13,j next j return
rose: for j=13 to 1 step -1 2d_pen_color 255,225-7*j,255 2d_fill_color 255,225-7*j,255 2d_circle 13,13,j next j return
rouge: for j=13 to 1 step -1 2d_pen_color 255-5*(j-1),50,100 2d_fill_color 255-5*(j-1),50,100 2d_circle 13,13,j next j return
pomme: for j=13 to 1 step -1 2d_pen_color 220-15*(j-1),255,0 2d_fill_color 220-15*(j-1),255,0 2d_circle 13,13,j next j return
tous: for k=1 to 465 2d_target_is k h=int(rnd(8))+1 select h case 1 : gosub vert case 2 : gosub orange case 3 : gosub violet case 4 : gosub bleu case 5 : gosub rouge case 6 : gosub jaune case 7 : gosub rose case 8 : gosub pomme end_select display next k midi_on midi_play int(rnd(24))+69,7 midi_off if clicked(0)=1 then goto zut for k=1 to 465 2d_target_is k gosub bouton next k return
va: midi_on midi_play int(rnd(24))+69,7 midi_off c=int(rnd(8))+1 for k=1 to 31 step 2 for h=0 to 464 step 31 2d_target_is k+h select c case 1 : gosub vert case 2 : gosub orange case 3 : gosub violet case 4 : gosub bleu case 5 : gosub rouge case 6 : gosub jaune case 7 : gosub rose case 8 : gosub pomme end_select if k<31 2d_target_is k+h+1 select c case 1 : gosub vert case 2 : gosub orange case 3 : gosub violet case 4 : gosub bleu case 5 : gosub rouge case 6 : gosub jaune case 7 : gosub rose case 8 : gosub pomme end_select end_if next h display for h=0 to 464 step 31 2d_target_is k+h gosub bouton if k<31 2d_target_is k+h+1 gosub bouton end_if next h next k if clicked(0)=1 then goto zut display return
vert: for j=13 to 1 step -1 2d_pen_color 0,255-7*j,0 2d_fill_color 0,255-7*j,0 2d_circle 13,13,j next j return
violet: for j=13 to 1 step -1 2d_pen_color 255-7*j,0,255 2d_fill_color 255-7*j,0,255 2d_circle 13,13,j next j return
zut: terminate
JOYEUX NOËL !!! | |
|