Jump to content

Programowanie


eros_14
 Share

Recommended Posts

Myśle że jest tu pewnie jakaś osoba co zna się na programowaniu i może sprzawdzić mi gdzie w moim kodzie jest błąd bo pisze gre w TP ale tu błąd no i niewiem.

Kodu źrudłowego niemoge wkleic ale jak ktoś się zdecyduje mi pomuc to niech napisze i poda swojego maila i podeśle mu programik

Link to comment
Share on other sites

program VIVI; { version 2.00 } uses Crt,VGA_Lib; var Szybkosc : integer; Kierunek1 : byte; X,Y : integer; Klawisz : char; Kolor : byte; LosowyKolor : boolean; procedure Powitanie; begin ClrScr; TextBackground(Red); TextColor(Blue); gotoXY(30,10); Writeln('VIVI'); gotoXY(30,13); Writeln('Sterowanie strzałkami'); gotoXY(30,14); Writeln('1 - Przyspiesz'); gotoXY(30,15); Writeln('2 - Zwolnij'); gotoXY(30,16); Writeln('3 - Zmien kolor'); gotoXY(30,17); Writeln('4 - Losowy kolor'); gotoXY(30,18); Writeln('5 - Pauza'); gotoXY(30,19); Writeln('Esc- Koniec'); ReadKey; end; procedure CzyscEkran; begin end; procedure CzytajKlawisz; begin Klawisz:= ReadKey; case Klawisz of #72: Kierunek1:=1; { Gorna strzałka } #80: Kierunek1:=2; { Dolna strzałka } #75: Kierunek1:=3; { Lewa strzałka } #77: Kierunek1:=4; { Prawa strzałka } #49: if Szybkosc>0 then Dec(Szybkosc); {1} #50: Inc(Szybkosc); {2} #51: Kolor:= Kolor + 1; {3} #52: LosowyKolor:= true; {4} #53: ReadKey; {5} end; end; begin Powitanie; Init; LosowyKolor:= False; Szybkosc:= 50; Kierunek1:= 4; Kolor:=1; x:=100; y:=100; repeat if KeyPressed then CzytajKlawisz; if Kierunek1= 1 then dec(y) else if Kierunek1= 2 then inc(y) else if Kierunek1= 3 then dec(x) else if Kierunek1= 4 then inc(x); if y= 200 then Kierunek1:=1; if y= 0 then Kierunek1:=2; if x= 320 then Kierunek1:=3; if x= 0 then Kierunek1:=4; if LosowyKolor=true then Kolor:= Random(255); if Kolor>= 255 then kolor:= 0; Plot(x,y,Kolor); Delay(Szybkosc); until Klawisz= #27; ClInit; end.
Link to comment
Share on other sites

program VIVI; { version 2.00 } uses Crt,VGA_Lib; var Szybkosc : integer; Kierunek1 : byte; X,Y : integer; Klawisz : char; Kolor : byte; LosowyKolor : boolean; procedure Powitanie; begin ClrScr; TextBackground(Red); TextColor(Blue); gotoXY(30,10); Writeln('VIVI'); gotoXY(30,13); Writeln('Sterowanie strzałkami'); gotoXY(30,14); Writeln('1 - Przyspiesz'); gotoXY(30,15); Writeln('2 - Zwolnij'); gotoXY(30,16); Writeln('3 - Zmien kolor'); gotoXY(30,17); Writeln('4 - Losowy kolor'); gotoXY(30,18); Writeln('5 - Pauza'); gotoXY(30,19); Writeln('Esc- Koniec'); ReadKey; end; procedure CzyscEkran; begin end; procedure CzytajKlawisz; begin Klawisz:= ReadKey; case Klawisz of #72: Kierunek1:=1; { Gorna strzałka } #80: Kierunek1:=2; { Dolna strzałka } #75: Kierunek1:=3; { Lewa strzałka } #77: Kierunek1:=4; { Prawa strzałka } #49: if Szybkosc>0 then Dec(Szybkosc); {1} #50: Inc(Szybkosc); {2} #51: Kolor:= Kolor + 1; {3} #52: LosowyKolor:= true; {4} #53: ReadKey; {5} end; end; begin Powitanie; Init; LosowyKolor:= False; Szybkosc:= 50; Kierunek1:= 4; Kolor:=1; x:=100; y:=100; repeat if KeyPressed then CzytajKlawisz; if Kierunek1= 1 then dec(y) else if Kierunek1= 2 then inc(y) else if Kierunek1= 3 then dec(x) else if Kierunek1= 4 then inc(x); if y= 200 then Kierunek1:=1; if y= 0 then Kierunek1:=2; if x= 320 then Kierunek1:=3; if x= 0 then Kierunek1:=4; if LosowyKolor=true then Kolor:= Random(255); if Kolor>= 255 then kolor:= 0; Plot(x,y,Kolor); Delay(Szybkosc); until Klawisz= #27; ClInit; end.

 

 

jesli to nadal aktualne to napisz do czego ma sluzyc ten program

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Terms of Use