Вы читаете журнал [info]god_dahaka

Hig
Ололо)

Дооо, порой вспоминаются моменты уже ушедших дней, как например сейчас.

 
 
Hig
21 Декабрь 2007 @ 23:58




PROGRAM GAME_1;
USES crt,graph;
VAR a,b,shag,size:integer;
ch:char;user_one,user_two,multi:string;
PROCEDURE start(shag,size:integer;multi,user1,user2:string);
const x=640; y=470;
var ch:char;
q,w,e,r:integer;
o:boolean;
begin
q:=x div 2; w:= y div 2;
e:=q; r:=w;
repeat
case ch of
chr(72):if (q<=120) and (w-shag<=28) then else if (w-shag>=0) then w:=w-shag;
chr(80):if (w+size+shag<=y) then w:=w+shag;
chr(75):if (q-shag<=120) and (w<=28) then else if (q-shag>=0) then q:=q-shag;
chr(77):if (q+size+shag<=x) then q:=q+shag;
else case ch of
'w':if (e<=120) and (r-shag<=28) then else if (r-shag>=0) then r:=r-shag;
's':if (r+size+shag<=y) then r:=r+shag;
'a':if (e-shag<=120) and (w<=28) then else if (e-shag>=0) then e:=e-shag;
'd':if (e+size+shag<=x) then e:=e+shag;
else end; end;
if ch<>#0 then begin
SetColor(9);
SetFillStyle(1,14);
bar(q,w,q+size,w+size);
outtextxy(q,w,user1+#11);
SetColor(11);
SetFillStyle(1,12);
if multi='yes' then begin
bar(e,r,e+size,r+size);
outtextxy(e,r,user2+#12);
end;
end;
if KeyPressed then
begin
ch:=readkey;
if(ch='w')or(ch='s')or(ch='a')or(ch='d')or(ch=#72)or(ch=#80)or(ch=#75)or(ch=#77)then
begin
SetColor(0);
SetFillStyle(10,0);
outtextxy(q,w,user1+#11);
outtextxy(e,r,user2+#12);
bar(q,w,q+size,w+size);
bar(e,r,e+size,r+size);
end;
end
else ch:=#0;
o:=(ch='r') or (ch=#27);
until o;
end;
BEGIN
Write('speed=');Read(shag);
Write('size car=');Read(size);
readln;
WriteLn('multipley? yes/no');read(multi);
readln;
Write('user_1='); Read(user_one);
user_two:='';
if multi='yes' then begin readln; Write('user_2='); Read(user_two);end;
initGraph(a,b,'');
SetColor(15);
OuttextXY(0,0,'w-up');
OuttextXY(60,0,'s-down');
OuttextXY(0,10,'a-left');
OuttextXY(60,10,'d-right');
OuttextXY(25,20,'r-exit');
SetColor(10);Line(0,28,120,28);Line(120,28,120,0);
start(shag,size,multi,user_one,user_two);
CloseGraph;
END.
Метки:
 
 
Current Location: в облаках
Моё настроение: crazyтипичное
Music: Porno Graffiti - Melissa [[ (Full Metal Alchemist Complete Best (Limited Edition))