Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uses Crt;
- Const
- w1= 80;
- h1= 25;
- frq_g= 50;
- type
- tmap= array [1..w1, 1..h1] of integer;
- var
- map: tmap;
- temp_w, temp_h, temp_r, t_wx, t_wy: integer;
- test1_x, test1_y, test2: integer;
- procedure continent;
- begin
- map[temp_w, temp_h]:=2;
- t_wx:= wherex;
- t_wy:= wherey;
- for temp_r:= 1 to frq_g do begin
- test1_x:= temp_w+1;
- test1_y:= temp_h+1;
- if test1_x>w1 then test1_x:=temp_w
- else
- if test1_y>h1 then test1_y:=temp_h
- else
- if test1_x<0 then test1_x:=temp_w
- else
- if test1_y<0 then test1_y:=temp_h;
- map[test1_x, test1_y]:=2;
- end;
- end;
- begin
- ClrScr;
- randomize();
- for temp_r:= 1 to frq_g do
- map[Random(79)+1, Random(24)+1]:=5;
- for temp_w:= 1 to w1 do
- for temp_h:= 1 to h1 do
- begin
- begin
- if map[temp_w, temp_h]= 5 then continent
- else
- end;
- map[temp_w, temp_h]:= Random(3);
- end;
- for temp_w:= 1 to w1 do
- for temp_h:= 1 to h1 do
- begin
- if map[temp_w, temp_h]= 2 then textcolor(2)
- else textcolor(1);
- write('█');
- end;
- Readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement