Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <map>
- #include <string>
- #include <fstream>
- //klasa MMPMap
- //laduje i zapisuje pliki map MMP
- class MMPMap
- {
- private:
- int sizeX, sizeY; //rozmiar mapy
- int* mapData; //dane mapy
- std::map<std::string, std::string> properties;
- public:
- MMPMap(int sizeX, int sizeY); //konstruktor - tworzy pusta mape o rozmiarze x * y
- MMPMap(std::string fileName); //konstruktor - laduje mape z pliku
- ~MMPMap(); //destruktor
- int getSizeX(); //pobranie szerokosci mapy
- int getSizeY(); //pobranie wysokosci mapy
- int getField(int x, int y); //pobranie pola mapy
- void setField(int x, int y, int value); //ustawienie pola mapy
- void setProperty(std::string propertyName, std::string propertyValue); //ustawia wlasciwosc mapy
- std::string getProperty(std::string propertyName); //pobiera wlasciwosc mapy
- bool saveToFile(std::string fileName); //zapisuje mape do pliku
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement