Skip to content

Instantly share code, notes, and snippets.

@paulohenriquesn
Created October 24, 2018 19:32
Show Gist options
  • Save paulohenriquesn/03c8c3e8f6c76adbff6bbfe75919685f to your computer and use it in GitHub Desktop.
Save paulohenriquesn/03c8c3e8f6c76adbff6bbfe75919685f to your computer and use it in GitHub Desktop.
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