Alright this is what I have so far!....Anyone what to help continue it?
Code:
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "const_variables.h"
#include "CVillage.h"
#include "CInhabitant.h"
#include "CbabyStork.h"
#include "CspoonStork.h"
#include "CStork.h"
#include "CroofStork.h"
CVillage::CVillage()
{
unsigned short usC;
srand((unsigned)time(0));
maxAge = VILLAGE_MAX_AGE;
currentAge = 0;
startYear = rand()%(int)VILLAGE_MAX_START_YEAR;
currentYear = startYear;
foodPortions = VILLAGE_INIT_FOOD_PORTIONS;
houses = VILLAGE_INIT_HOUSES;
totalPopulation = 0;
Stork = 0;
Stork1 = 0;
Stork2 = 0;
Stork3 = 0;
for(usC = 0; usC < VILLAGE_MAX_INHABITANTS; usC++) { Inhabitants[usC] = 0; }
villageBirth();
}
CVillage::~CVillage()
{
}
void CVillage::villageBirth()
{
std::cout << "Give the town a name (max 50 letters): ";
std::cin >> name;
std::cout << "\n\"" << name << "\". Is the year " << currentYear;
std::cout << currentYear + maxAge << " What point the town is " << houses << " house and food " << foodPortions << " amount. ";
std::cout << "How much the town fits " << VILLAGE_MAX_INHABITANTS;
std::cout << "\n\n";
system("pause");
villageLive();
}
void CVillage::villageLive()
{
Stork = Stork1->bringStork();
Inhabitants[totalPopulation] = Stork1->bringBaby();
Inhabitants[totalPopulation]->inhabitantDeath();
totalPopulation++;
/*
->getOccupationID() -> 1 Birthgivers, 2 Cooks 3 Builders
while(1)
{
std::cout << "\nVillage has lived a year...\n";
}*/
}
void CVillage::villageDeath()
{
std::cout << "\nVillage has died...\n";
}
CStork* CVillage::callStork()
{
return 0;
}
unsigned short CVillage::maxAge = VILLAGE_MAX_AGE;
const float CVillage::foodToIncDeath = (float)VILLAGE_FOOD_PER_INH_TO_INC_DEATH;
const unsigned short CVillage::deathInc = VILLAGE_DEATH_INC_PERCENT;
const float CVillage::housesToIncBirth = VILLAGE_HOUSES_PER_INH_TO_INC_BIRTH;
const unsigned short CVillage::birthInc = VILLAGE_BIRTH_INC_PERCENT;