Changeset 233e736 in network-game
- Timestamp:
- Sep 27, 2013, 6:56:04 PM (11 years ago)
- Branches:
- master
- Children:
- a6fe73d
- Parents:
- d519032
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
rd519032 r233e736 856 856 cout << "Game name: " << gameName << endl; 857 857 858 game = new Game(gameName); 859 858 game = new Game(gameName, "../../data/map.txt"); 859 860 /* 860 861 state = STATE_NEW_GAME; 861 862 … … 864 865 865 866 msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog); 867 */ 866 868 867 869 break; -
common/Game.cpp
rd519032 r233e736 11 11 } 12 12 13 Game::Game(string name ) {13 Game::Game(string name, string filepath) { 14 14 this->id = 0; 15 15 this->name = name; 16 16 this->blueScore = 0; 17 17 this->redScore = 0; 18 this->worldMap = WorldMap::loadMapFromFile( "../data/map.txt");18 this->worldMap = WorldMap::loadMapFromFile(filepath); 19 19 } 20 20 -
common/Game.h
rd519032 r233e736 30 30 public: 31 31 Game(); 32 Game(string name );32 Game(string name, string filepath); 33 33 34 34 ~Game(); -
common/WorldMap.cpp
rd519032 r233e736 124 124 bool foundObject = false; 125 125 126 cout << "Searching for ob bject to update" << endl;126 cout << "Searching for object to update" << endl; 127 127 switch (t) { 128 128 case WorldMap::OBJECT_BLUE_FLAG: … … 198 198 ifstream file(filename.c_str()); 199 199 200 cout << "Trying to open file: " << filename << endl; 201 200 202 if (file.is_open()) 201 203 { 204 cout << filename << " opened successfully" << endl; 205 202 206 string line; 203 207 int width, height; … … 299 303 } 300 304 file.close(); 305 cout << filename << " closed" << endl; 301 306 } 302 307 else 303 308 cout << "Could not open the file" << endl; 309 310 cout << "Finished file processing" << endl; 304 311 305 312 return m;
Note:
See TracChangeset
for help on using the changeset viewer.