| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- Uses Objs,Graph,ASMB,CRT;
- CONST
- mencount = 10;
- ProceDure DelayBlock(Num,Count : word);
- var i:word;
- begin
- for i:=0 to Num Do Delay(Count);
- end;
- VAR
- Men : array [1..mencount] of CMAn;
- i,j:integer;
- BEGIN
- i:=detect;
- j:=0;
- InitGraph(i,j,'');
- Randomize;
- for i := 1 to mencount do
- begin
- men[i].Init(random(640),Random(400),random(360)-180,random(3)+1,'Fuck',Random(16));
- men[i].NewMove := random(40);
- men[i].MaxSpeed := 5;
- men[i].SetSpeed(random/2+0.5);
- men[i].SetAccel(0);
- end;
- setFillStyle(Black,SolidFill);
- while not keyPressed do
- begin
- OutTextXY(10,10,'Симулятор пьяной толпы');
- for i := 1 to mencount do Men[i].Draw;
- DelayBlock(10,2*MaxInt);
- ClearDevice;
- for i := 1 to mencount do begin
- { Men[i].Clear;}
- Men[i].Step;
- end
- End;
- CloseGraph;
- for i := 1 to mencount do Men[i].Destroy;
- END.
|