Advertisement
Guest User

Untitled

a guest
Oct 30th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. void Map::increaseMap() {
  2.     char** newMap = createMap(AREA_SIZE_X, AREA_SIZE_Y + 1);
  3.  
  4.     for (int i = 0; i < AREA_SIZE_X; ++i)
  5.     {
  6.         for (int j = 0; j < AREA_SIZE_Y; ++j)
  7.         {
  8.             newMap[i][j] = map[i][j];
  9.         }
  10.         newMap[i][AREA_SIZE_Y - 1] = '.';
  11.     }
  12.     AREA_SIZE_Y++;
  13.  
  14.     deleteMap(map, AREA_SIZE_X);
  15.  
  16.     map = newMap;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement