1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include "world.h"
#include <cmath>
#include <fstream>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <time.h>
using namespace std;
// Define functions
int dieroll(int x);
double calculate_density(string a);
double calculate_diameter(string a, int x, double y);
bool check_atmospheric_mass(string a);
int determine_average_surface_temperature(string a);
double determine_atmospheric_pressure(string a, double x, double y);
int determine_blackbody_temperature(string a, double x, int y, int z);
string determine_marginal_atmosphere();
int determine_RVM(string a);
string get_climate_type(int x);
double round(double x, int y);
string select_world_type(double x, char a);
int vary_step(int x);
int main()
{
int amount;
char name[30];
World creator;
cout << "How many worlds would you like to create? ";
cin >> amount;
for (int i=1; i<=amount; i++)
{
if (i < 10)
sprintf(name, "World00%d.txt", i);
else if (i < 100)
sprintf(name, "World0%d.txt", i);
else
sprintf(name, "World%d.txt", i);
cout << name << endl;
creator.generate_world();
creator.output_world(name);
}
return 0;
}
| |