Changeset b650f8a in network-game


Ignore:
Timestamp:
Jun 23, 2013, 5:12:36 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
147f662
Parents:
9b1e12c
Message:

Increased the map size

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/WorldMap.cpp

    r9b1e12c rb650f8a  
    194194WorldMap* WorldMap::loadMapFromFile(string filename)
    195195{
    196    WorldMap* m = new WorldMap(12l, 12);
     196    WorldMap* m = NULL;
    197197
    198198   ifstream file(filename.c_str());
     
    217217      cout << "width: " << width << endl;
    218218      cout << "height: " << height << endl;
     219
     220      m = new WorldMap(width, height);
    219221
    220222      // read the map contents
     
    284286               case 1:
    285287                  structure = STRUCTURE_BLUE_FLAG;
    286                   cout << "Should have added blue flag object" << endl;
    287288                  break;
    288289               case 2:
    289290                  structure = STRUCTURE_RED_FLAG;
    290                   cout << "Should have added red flag object" << endl;
    291291                  break;
    292292               }
  • data/map.txt

    r9b1e12c rb650f8a  
    1 12x12
    2 2,2,2,2,2,2,2,2,2,2,2,2
    3 2,1,1,1,1,1,1,1,1,1,1,2
    4 2,1,1,1,1,1,1,1,1,1,1,2
    5 2,1,1,1,1,1,1,1,1,1,1,2
    6 2,1,1,1,1,1,1,1,1,1,1,2
    7 2,1,1,1,1,2,1,1,1,1,1,2
    8 2,1,1,1,1,1,1,1,1,1,1,2
    9 2,1,1,1,1,1,1,1,1,1,1,2
    10 2,1,1,1,1,1,1,1,1,1,1,2
    11 2,1,1,1,1,1,1,1,1,1,1,2
    12 2,1,1,1,1,1,1,1,1,1,1,2
    13 2,2,2,2,2,2,2,2,2,2,2,2
    14 6,1,1
    15 6,10,2
     125x25
     22,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
     32,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     42,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     52,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     62,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     72,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     82,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     92,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     102,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     112,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     122,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     132,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     142,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     152,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     162,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     172,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     182,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     192,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     202,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     212,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     222,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     232,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     242,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     252,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
     262,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
     2712,1,1
     2812,23,2
Note: See TracChangeset for help on using the changeset viewer.