8 уровень
Группа: Проверенные
Сообщений: 716
| НЕ ВЕРИТЕ ЧТО Я ЗНАЮ ПАСКАЛЬ?????????????????? Вот вам прога, где я через графический режим попытался сделать стрельбу по мишени. Немного недоделанная, НО Я ЗНАЮ ПАСКАЛЬ!!!!!!!!!!!!!!!! Program Krug; uses Graph,CRT; var grDriver: Integer; grMode: Integer; ErrCode: Integer; R,h,col: Integer; x,y,n: Integer; vop: char; Ochki: Integer; Cheat: char; Pod: string; p: string; d: string; c: string; z: string; k: string; m: string; begin grDriver := Detect; InitGraph(grDriver, grMode,''); h:=10; R:=8*h; SetColor(blue); Rectangle(0,0,639,479); SetFillStyle(1,2); FloodFill(10,10,blue); for col:=8 to 15 DO begin SETcolor(col); Circle(320,240,r); SetFillStyle(1,col); FloodFill(320,240,col); SetColor(black); Circle(320,240,r); R:=R-h; end; putpixel(320,240,black); putpixel(321,240,black); putpixel(321,241,black); putpixel(320,241,black); SetColor(White); SetTextStyle(DefaultFont, HorizDir, 1); Outtextxy(3,3,'Hello!'); SetColor(Blue); SetTextStyle(DefaultFont,HorizDir,3); Setcolor(Black); SetTextStyle(GothicFont,HorizDir,2); OutTextxy(500,50,'Hod igri:'); OutTextxy(50,50,'Vi hotite nachat igru(Y/N)?'); readln(vop); OutTextxy(390,450,'_ _ _ _ _ _ _ _ _ _ _ _ _ _ _'); if vop='Y' then OutTextxy(60,60,'igra nachalas!!'); if vop='N' then exit; Ochki:=0; write(Ochki); SetColor(Red); OutTextxy(70,70,'Vi hotite ispolzovat kodi v igre(Y/N)?'); readln(Cheat); if Cheat='Y' then OutTextxy(390,340,'_ _ _ _ _ _ _ _ _ _ _ _ _ _ _'); if Cheat='N' then OutTextxy(390,360,'Otvette na sledyyshie voprosi/'); OutTextxy(80,80,'Tocno?(da,da!-net)'); readln(pod); if pod='da' then OutTextxy(390,350,'|'); if pod='da!' then OutTextxy(390,370,'Otvette na sledyishie voprosi/'); OutTextxy(100,100,'Tochno?(da,da!-net)'); readln(z); if z='da' then OutTextxy(390,370,'|'); if z='da!' then OutTextxy(390,380,'Otvette na sledyishie voprosi/'); OutTextxy(70,90,'Tochno?(da,da!-net)'); readln(p); SetColor(Blue); if p='da' then OutTextxy(390,360,'|'); if p='da!' then OutTextxy(390,350,'igra prodolshaetsa bes kodov!!!!'); for n:= 1 to 5 DO begin readln(x); if x>640 then break; readln(y); if y>480 then break; Circle(x,y,1); PutPixel(x,y,Black); SetTextStyle(DefaultFont,horizdir,1); if x=320 then OutTextxy(450,70,'Vertikal verna'); if y=240 then OutTextxy(450,60,'Gorizontal verna'); if x=320 then OutTextxy(600,70,'10'); if y=240 then OutTextxy(600,60,'10'); if x=320 then Ochki:=ochki+10; if y=240 then Ochki:=ochki+10; if (x=320) and (y=240) then begin OutTextxy(450,80,'V iablochko!!'); OutTextxy(600,80,'50'); Ochki:=ochki+50; end; str(ochki, m); m:= 'OCHKI: '+ m; bar(550,40,585,46); OutTextxy(500,40,m); end; readln; closegraph; end.
Я ябан
|