Здравствуйте! Помогите пожалуйста написать игру или найти исходник для нее! Я не знаю как она действительно называется, но суть такова : пользователь управляет шариком(вправо-влво),небольшие пластины движутся вверх; шарик должен перемещаться по этим пластинам так, чтобы не упасть в "бездну" и не дойти до верней точки игрового поля.
Var grDriver : Integer; grMode : Integer; prep: array[1..kp] of plo; preptemp:plo; i:byte; s:shar; is,ip:byte; nk:byte; kv:byte; {- 400 } Begin grDriver:=Detect; InitGraph(grDriver, grMode, ''); randomize; for i:=1 to kp do prep[i].y:=480; prep[1].x:=random(400); prep[1].y:=479; s.x:=random(400); s.y:=3;
repeat
{ delay(20);} putpixel(s.x,s.y,15); {аЁб㥬 «ЁЁЁ} setcolor(15); for i:=1 to kp do If (prep[i].x<>0) and (prep[i].y<>480) then line(prep[i].x,prep[i].y,prep[i].x+70,prep[i].y); inc(is); inc(ip); {®ЇгбЄ Ґ¬ и а} If is=Sshar then begin putpixel(s.x,s.y,0); inc(s.y); is:=0 end; {Ї®¤Ё¬ Ґ¬ Ї«®й ¤ЄЁ} If ip=sPlo then begin setcolor(0); for i:=1 to kp do If (prep[i].x<>0) and (prep[i].y<>480) then line(prep[i].x,prep[i].y,prep[i].x+70,prep[i].y);
for i:=1 to kp do If (prep[i].y)<>480 then dec(prep[i].y);
setcolor(15); for i:=1 to kp do If (prep[i].x<>0) and (prep[i].y<>0) then line(prep[i].x,prep[i].y,prep[i].x+70,prep[i].y); end;
If random(2)=1 then for i:=1 to kp do If prep[i].y=480 then If random(65000)=455 then begin prep[i].x:=random(400); prep[i].y:=479 end;
for i:=1 to KP do If prep[i].y=0 then prep[i].y:=480;
If keypressed then begin putpixel(s.x,s.y,0); nk:=ord(readkey); If nk=49 then dec(s.x); If nk=50 then inc(s.x); If (nk=27) then kv:=1; end;
If getpixel(s.x,succ(s.y))=15 then begin putpixel(s.x,s.y,0); If ip=splo-1 then dec(s.y,2) else dec(s.y); putpixel(s.x,s.y,15); If is>2 then dec(is) end;
until (s.y=0) or (s.y=480) or (kv=1);
closegraph; If s.y=0 then writeln('‚л Їа®ЁЈа «Ё'); If s.y=480 then writeln('‚л ўлЁЈа «Ё'); If (s.y<>0) and (s.y<>480) then writeln('‚л ўли«Ё Ё§ ЁЈал'); writeln(' ¦¬ЁвҐ «оЎго Є« ўЁиг ...'); while not keypressed do; readkey; ClrScr; Halt; end.
Мой вариант. Что бы было из чего выбирать
Сообщение отредактировано: Oleg_Z -
--------------------
Помогая друг другу, мы справимся с любыми трудностями! "Не опускать крылья!" (С)