Advertisement
Andrey_Mironenko

Untitled

Dec 17th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Uses Crt;
  2.  
  3. Const
  4. w1= 80;
  5. h1= 25;
  6. frq_g= 50;
  7.  
  8. type
  9. tmap= array [1..w1, 1..h1] of integer;
  10.  
  11. var
  12. map: tmap;
  13. temp_w, temp_h, temp_r, t_wx, t_wy: integer;
  14. test1_x, test1_y, test2: integer;
  15.  
  16. procedure continent;
  17. begin
  18. map[temp_w, temp_h]:=2;
  19. t_wx:= wherex;
  20. t_wy:= wherey;
  21.  
  22. for temp_r:= 1 to frq_g do begin
  23. test1_x:= temp_w+1;
  24. test1_y:= temp_h+1;
  25. if test1_x>w1 then test1_x:=temp_w
  26. else
  27. if test1_y>h1 then test1_y:=temp_h
  28. else
  29. if test1_x<0 then test1_x:=temp_w
  30. else
  31. if test1_y<0 then test1_y:=temp_h;
  32. map[test1_x, test1_y]:=2;
  33. end;
  34. end;
  35.  
  36. begin
  37. ClrScr;
  38. randomize();
  39.  
  40.  
  41. for temp_r:= 1 to frq_g do
  42. map[Random(79)+1, Random(24)+1]:=5;
  43.  
  44. for temp_w:= 1 to w1 do
  45. for temp_h:= 1 to h1 do
  46. begin
  47. begin
  48. if map[temp_w, temp_h]= 5 then continent
  49. else
  50. end;
  51. map[temp_w, temp_h]:= Random(3);
  52. end;
  53.  
  54. for temp_w:= 1 to w1 do
  55. for temp_h:= 1 to h1 do
  56. begin
  57. if map[temp_w, temp_h]= 2 then textcolor(2)
  58. else textcolor(1);
  59. write('█');
  60. end;
  61. Readln;
  62. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement