Реферат: Программирование игры Змейка
185 }for i:=1 to 40 do
186 }Symbol(BonusX[i],BonusY[i],chr(64));
187 }textcolor(0);
188 }gotoxy(1,1);
189 }End;
{----------------------------------------------------------}
190 }Procedure AddBonus(b:longint);
191 }label 1;
192 }var
193 }Err,f:integer;
194 }Begin
195 }1:
196 }Err:=0;
197 }BonusX[b]:=Random(78)+1;
198 }BonusY[b]:=Random(48)+1;
199 }For f:=1 to 40 do
200 }if f<>b THEN
201 }if ((BonusX[f]=BonusX[b]) and (BonusX[f]<>0) and (BonusY[f]=BonusY[b]) and(BonusY[f]<>0)) THEN Err:=1;
202 }For f:=1 to Dlina do
203 }if (SnakeX[f]=BonusX[b]) and (SnakeY[f]=BonusY[b]) THEN Err:=1;
204 }IF Err=1 THEN goto 1;
205 }textcolor(0);
206 }gotoxy(1,1);
207 }End;
{-----------------------------------------------------------}
208 }Procedure Kill;
209 }Var c:array[1..6] of char;
210 }j:integer;
211 }label 1;