Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DragonEra
- {
- class DragonEra
- {
- static void Main()
- {
- int dragonNum = 2;
- int startEggsNum = dragonNum * 3;
- int hatchLive = 0;
- //int yearsInput = 5;
- string yearType = "Normal";
- int dragonAge = 1;
- int newbornsYear = 0;
- int newEggs = 0;
- List<int> dragon1 = new List<int>();
- List<int> dragon2 = new List<int>();
- for (hatchLive = 0; hatchLive <= 3; hatchLive++)
- {
- if ((dragonAge == 3) || (dragonAge == 4))
- {
- if (yearType == "Normal")
- {
- newEggs = dragonNum * 1;
- startEggsNum += newEggs;
- }
- if (yearType == "Bad")
- {
- continue;
- }
- if (yearType == "Good")
- {
- newEggs = dragonNum * 2;
- startEggsNum += newEggs;
- }
- }
- if (dragonAge == 6)
- {
- Console.WriteLine("One of your oldest dragons has died. No more eggs from him.");
- dragonNum--;
- }
- if ((newbornsYear == 2) && (yearType == "Normal"))
- {
- dragonNum *= 2;
- dragon1.Add(2);
- dragon2.Add(2);
- }
- if ((newbornsYear == 2) && (yearType == "Good"))
- {
- dragonNum *= 4;
- dragon1.Add(2);
- dragon1.Add(3);
- dragon2.Add(2);
- dragon2.Add(3);
- }
- newbornsYear++;
- dragonAge++;
- }
- Console.WriteLine("Dragons alive: {0}.", dragonNum);
- for (int i = 0; i < dragon1.Count; i++)
- {
- Console.WriteLine(dragon1[i]);
- }
- for (int j = 0; j < dragon2.Count; j++)
- {
- Console.WriteLine(dragon2[j]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement