コード例 #1
0
ファイル: Person.cs プロジェクト: RtHiaHB/PopSim2
        public void Meet(Person OtherPerson)
        {
            //checks for mateable compatibility
            //the potential mate must be of the appropriate age, and they
            //must meet preferential criteria.
            bool comp = false;

            myThoughtBubble += "\nI met " + OtherPerson.Name.ToString();
            //[FIXME]
            if (!OtherPerson.Pregnant && OtherPerson.MateableAge() &&
                this.MateableGender(OtherPerson.GetGender) &&
                !this.Pregnant && this.MateableAge())
            {
                comp = OtherPerson.DoYouLikeMe(this) && this.DoYouLikeMe(OtherPerson);
            }
            else
            {
                comp = false;
            }
            if (comp == true)
            {
                myThoughtBubble += "\nWe liked each other.";
                if (itsGender == Gender.Male)
                {
                    OtherPerson.Impregnate(this);
                }
                else
                {
                    this.Impregnate(OtherPerson);
                }
            }
            else
            {
                myThoughtBubble += "\nWe were not compatible.";
            }
        }
コード例 #2
0
ファイル: Person.cs プロジェクト: RtHiaHB/PopSim2
 public void Meet(Person OtherPerson)
 {
     //checks for mateable compatibility
     //the potential mate must be of the appropriate age, and they
     //must meet preferential criteria.
     bool comp = false;
     myThoughtBubble += "\nI met " + OtherPerson.Name.ToString();
     //[FIXME]
     if (!OtherPerson.Pregnant && OtherPerson.MateableAge() &&
         this.MateableGender(OtherPerson.GetGender) &&
         !this.Pregnant && this.MateableAge())
     {
         comp = OtherPerson.DoYouLikeMe(this) && this.DoYouLikeMe(OtherPerson);
     }
     else
     {
         comp = false;
     }
     if (comp == true)
     {
         myThoughtBubble += "\nWe liked each other.";
         if (itsGender == Gender.Male)
         {
             OtherPerson.Impregnate(this);
         }
         else
         {
             this.Impregnate(OtherPerson);
         }
     }
     else
     {
         myThoughtBubble += "\nWe were not compatible.";
     }
 }