示例#1
0
 //Method that is used to process allegiance for the Kingdom that Receives a Message. We can do all sorts of checks here before the Kingdom registers itself as an Ally of another Kingdom (Message Sender)
 //The 'ruler' object is the Kingdom that sent the message
 public void ProcessAllegiance(bool flag, Kingdom ruler)
 {
     //The Flag is sent in by the Message Processor, confirming that the Kingdom's emblem was found in the Incoming Message
     if (flag)
     {
         //The Kingdom can only be an Ally if it is not already an Ally of another kingdom AND is not competing for rulership of Southeros
         if (!isAlly && !isCompetingForRulership)
         {
             isAlly   = true;
             isAllyOf = ruler.GetKingdomName();
             //If everything is satisfactory, the Kingdom which is processing the allegiance registers itself as an Ally of the 'ruler' kingdom
             ruler.SetAlly(this);
         }
     }
 }
示例#2
0
 public string GetCurrentRulerName() => currentRuler.GetKingdomName();