/// <summary>
        /// Function imitate random occurence of famine on each planet at the same time
        /// When occurs, TechLevel decreases by choosen number of points
        /// and whole population decreases by 0-90%
        /// </summary>
        /// <returns>bool</returns>
        public bool Famine()
        {
            if (random.Next(0, 80) == 0 && listOfPlanets.getPlanetsAmount() > 4)
            {
                for (int i = 0; i < listOfPlanets.getPlanetsAmount(); i++)
                {
                    listOfPlanets.getCurrentPlanet().SetInhabitants((((double)random.Next(0, 10)) / (double)10) * listOfPlanets.getCurrentPlanet().getInhabitants());
                }
                factors.ModifyTechLevelByAddition(-2000);
                return(true);
            }

            return(false);
        }
        /// <summary>
        /// Returns number of whole population of all planets
        /// </summary>
        /// <returns>double</returns>
        public double getPopulation()
        {
            double Population = 0;

            for (int i = 0; i < listOfPlanets.getPlanetsAmount(); i++)
            {
                Population += listOfPlanets.getCurrentPlanet().getInhabitants();
            }
            return(Population);
        }
        private void timerMainTimer(object sender, EventArgs e)
        {
            //two functions below modify inhabitants number and techlevel
            factors.ModifyTechLevelByAddition(50);
            factors.ModifyInhabitantsByAddition();

            //functions below are responsible for gui and displaying stats
            labelPopulationNumber.Text = factors.getPopulation().ToString();
            labelInhabitants.Text      = listOfPlanets.getCurrentPlanet().getInhabitants().ToString();
            labelPlanetsNumber.Text    = listOfPlanets.getPlanetsAmount().ToString();
            labelTechLevel.Text        = factors.getTechLevel().ToString();
            labelRacesAmount.Text      = listOfPlanets.getCurrentPlanet().getAmountfRaces().ToString();
            labelDensity.Text          = listOfPlanets.getCurrentPlanet().getDensity().ToString();
            raceControl.TryTooCreateNewRace();

            //If war occurs, then picture changes
            if (warControl.TryToStartWar())
            {
                pictureBox.Image     = Properties.Resources.battle;
                labelWorldEvent.Text = "IT'S WAR TIME!";
            }

            //If colonisation occurs, then picture changes
            if (colonisation.tryToColonize())
            {
                pictureBox.Image     = Properties.Resources.colonisation;
                labelWorldEvent.Text = "IT'S COLONISATION TIME!";
            }

            //If famine occurs, then picture changes
            if (disaster.Famine())
            {
                pictureBox.Image     = Properties.Resources.famine;
                labelWorldEvent.Text = "IT'S FAMINE TIME!";
            }
        }