bool Map::IsEmpty(int x, int y) { Building *bd = GetBuilding(x, y); if (bd->GetType() == NONE) return true; else return false; }
void Map::DestroyBuilding(int x, int y) { Building *bd = GetBuilding(x, y); if (bd->GetType() != NONE) { bd->Destroy(); std::cout << "Building destroyed.\n"; } }
int Map::CreateBuilding(int x, int y, BUILDINGTYPE type, OWNER owner) { Building *bd = GetBuilding(x, y); if (bd->GetType() == NONE) { bd->Create(type, owner); std::cout << "Building created.\n"; return 1; } else { /*std::cout << "Cannot build.\n";*/ return 0; } }