Exemplo n.º 1
0
	//public MySecondScript secondScriptqqqqqqwe;

	void Awake()
	{
		Debug.Log ("Awake");
		myMatchMaker = new Matchmaker();
		myPeople = new MyPeople();
		int lastYear = 0;
		currentYear = 0;

		Person Adam = new Person(Person.PersonType.Adam, currentYear.ToString());
		Person Eve = new Person(Person.PersonType.Eve, currentYear.ToString());
		var personAIndex = myPeople.addToAllPeople(Adam);
		var personEIndex = myPeople.addToAllPeople(Eve);
		myMatchMaker.addToSinglesList(personAIndex, Adam.Sex);
		myMatchMaker.addToSinglesList(personEIndex, Eve.Sex);

		//Debug.Log ("Hello " + Adam.Name + " and " + Eve.Name + " !");
		//Debug.Log (Adam.GetSex() + " and " + Eve.GetSex());

		/// TODO
		/// implement the House cluster Display List Data type
		/// Draw a sample Cluster
		/// put in Marriage portals
		/// put in tomb stones
		/// add in Divorce and side winds
		/// 
		for (currentYear = 0 ; currentYear < 200 ; currentYear++)
		{

			Debug.Log ("Happy New Year!!.  It is year: " + currentYear.ToString());
			Debug.Log ("We have " + myMatchMaker.BachelorPersonIndexList.Count + " Bachelors, and " +
			           myMatchMaker.BachelorettePersonIndexList.Count + " Bachelorettes");
			Debug.Log ("Our people count is " + myPeople.allPeople.Count + ", with alive count =" + myPeople.livingCount());
			Debug.Log ("We have " + myMatchMaker.allFamilies.Count + " Families <-----------------------");

			myMatchMaker.doWeddings(currentYear);
			myMatchMaker.beFruitfullAndMultiply(currentYear);
			myPeople.mortality(currentYear);

			lastYear = currentYear;
		}
		Debug.Log("We are done with populating the earth!");

		myMatchMaker.displayAllFamilies(lastYear);

	}