71 lines
1.9 KiB
QBasic
71 lines
1.9 KiB
QBasic
10 vol 7
|
|
20 sound 1,440,10
|
|
30 sound 1,350,20
|
|
40 sound 1,440,10
|
|
50 sound 1,392,20
|
|
60 i=0: a=0: b=0
|
|
70 input"{clear}come ti chiami";a$
|
|
80 print"{clear}"
|
|
90 y=0
|
|
100 rem main
|
|
110 gosub 2000: rem draw table
|
|
120 gosub 3000: rem set cursor
|
|
160 a=int(rnd(0)*5)+1
|
|
170 b=int(rnd(0)*5)+1
|
|
180 print
|
|
190 printtab(14)"{black}quanto fa ";a;"+";b;:input c
|
|
200 if c=(a+b) then gosub 1000
|
|
210 if c<>(a+b) then gosub 1500
|
|
215 rem print
|
|
218 y=peek(205)
|
|
220 goto 100
|
|
1000 rem conto giusto
|
|
1010 printtab(14)"{green}benissimo!!"
|
|
1020 sound 1,440,10
|
|
1030 sound 1,494,10
|
|
1040 sound 1,523,20
|
|
1050 i=i+1
|
|
1060 return
|
|
1500 rem errore
|
|
1510 printtab(14)"{red}nooo..."
|
|
1520 sound 3,440,10
|
|
1530 sound 3,400,10
|
|
1540 sound 3,360,20
|
|
1550 return
|
|
2000 rem Tabellone
|
|
2002 if y>19 then print"{clear}":y=0
|
|
2005 print"{home}{black}"
|
|
2010 print"U{192}{192}{192}{192}{192}{192}{192}{192}{192}{192}I"
|
|
2020 print"{221} ciao {221}"
|
|
2030 print"{221} {221}"
|
|
2035 print"{171}{192}{192}{192}{192}{192}{192}{192}{192}{192}{192}{179}"
|
|
2040 print"{221} {221}"
|
|
2050 print"{221}QQQQQQQQQQ{221}"
|
|
2060 print"{221} {221}"
|
|
2070 print"{221}QQQQQQQQQQ{221}"
|
|
2080 print"{221} {221}"
|
|
2090 print"{221}QQQQQQQQQQ{221}"
|
|
2100 print"{221} {221}"
|
|
2105 print"{221}QQQQQQQQQQ{221}"
|
|
2110 print"{221} {221}"
|
|
2120 print"J{192}{192}{192}{192}{192}{192}{192}{192}{192}{192}K"
|
|
2125 rem riempimento dei campi
|
|
2130 print"{home}"
|
|
2140 print:print:printtab(2)a$
|
|
2150 print:print:printtab(1);
|
|
2160 if i>0 then gosub 2200
|
|
2170 return
|
|
2200 rem riempimento pallini
|
|
2205 j=1
|
|
2210 do while j<=i
|
|
2220 print"{green}Q";
|
|
2225 j=j+1
|
|
2228 if j=11 then print:print:printtab(1);
|
|
2229 if j=21 then print:print:printtab(1);
|
|
2230 if j=31 then print:print:printtab(1);
|
|
2240 loop
|
|
2900 return
|
|
3000 rem set cursor
|
|
3010 print"{home}"
|
|
3020 if y>0 then for j=1 to y:print:next j
|
|
3100 return |