Exemplo n.º 1
0
    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));
        }
    }
Exemplo n.º 2
0
 public void dummyGet()
 {
     CityCard.get(CityNodeList [4]);
 }