Exemplo n.º 1
0
        public CardChance drawChance()
        {
            CardChance res = chanceCards[0];

            chanceCards.RemoveAt(0);
            //If it's the "Get out of jail" card
            if (res.getId() != 7)
            {
                chanceCards.Insert(chanceCards.Count(), res);
            }
            return(res);
        }
Exemplo n.º 2
0
 public void init(string pathToCommunity, string pathToChance)
 {
     try
     {
         communityCards = File.ReadAllLines(pathToCommunity).Skip(1).Select(v => CardCommunity.FromCsv(v)).ToList();
         chanceCards    = File.ReadAllLines(pathToChance).Skip(1).Select(v => CardChance.FromCsv(v)).ToList();
         shuffle(communityCards);
         shuffle(chanceCards);
     }
     catch (DirectoryNotFoundException e)
     {
         Form_board.GetInstance.insert_console("Error : Cannot find path : " + e);
     }
 }