Created
October 24, 2018 19:32
-
-
Save paulohenriquesn/03c8c3e8f6c76adbff6bbfe75919685f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Monarchy | |
{ | |
public enum Title | |
{ | |
Emperor, | |
King, | |
Regent, | |
Imperial_Prince, | |
Real_Prince, | |
Grand_Prince, | |
Prince, | |
Infant, | |
Archduke, | |
Grand_Duke, | |
Duke, | |
Count_Duke, | |
Marquis, | |
Count, | |
Count_Baron, | |
Viscount, | |
Baron, | |
Baronet, | |
Knight, | |
Squire | |
} | |
public enum Belief | |
{ | |
} | |
public static List<Empire> Empires = new List<Empire>(); | |
public class Person | |
{ | |
public string Name { get; set; } | |
public int Age { get; set; } | |
public Title Title { get; set; } | |
public string Empire { get; set; } | |
} | |
public class Empire | |
{ | |
public string Name { get; set; } | |
public double Wealth { get; set; } | |
public Belief Belief { get; set; } | |
public bool isThereAnEmperor { get; set; } | |
public Person whoisKing { get; set; } | |
public Person whoisEmperor { get; set; } | |
public void SaveEmpire() | |
{ Empires.Add(this); } | |
public bool hasSaved() | |
{ | |
if (Empires.Contains(this)) | |
return true; | |
else | |
return false; | |
} | |
public void DeleteEmpire() | |
{ | |
if (hasSaved()) | |
Empires.Remove(this); | |
else | |
throw new Exception("You don't have saved for delete this."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment