public void initializePlayerDeck() { aPlayerDeck.Clear(); List <GameObject> CityMap = GameObject.Find("CityHub").GetComponent <CityHub> ().CityNodeList; for (int i = 0; i < CityMap.Count; i++) { aPlayerDeck.Add(CityCard.get(CityMap [i])); } //TODO Add EventCards //Shuffling for (int i = 0; i < aPlayerDeck.Count; i++) { GameObject temp = aPlayerDeck[i]; int randomIndex = Random.Range(i, aPlayerDeck.Count); aPlayerDeck[i] = aPlayerDeck[randomIndex]; aPlayerDeck[randomIndex] = temp; } //Add Epidemic Card int x = aPlayerDeck.Count / EpidemicCard.numberOfEC(); for (int i = 0; i < EpidemicCard.numberOfEC(); i++) { int y = Random.Range(i * x, (i + 1) * x); aPlayerDeck.Insert(y + i, EpidemicCard.get(i)); } }
public void dummyGet() { CityCard.get(CityNodeList [4]); }