public void LoadFromFiles(String cardPath = null, String playersPath = null) { if (cardPath == null) { cardPath = @"Cartas.csv"; } if (playersPath == null) { playersPath = @"Players.csv"; } cards = new CardCollection(); cards.ReadFromFile(cardPath); HelperCsv fichero = new HelperCsv(playersPath); Player player; oponentes = new List <Player>(); for (int i = 0; i < fichero.Count; i++) { player = new Player(); player.LoadFromCsv(fichero, i, this.cards); oponentes.Add(player); } }
public void LoadFromFiles(String cardPath = null, String playersPath = null) { if (cardPath == null) cardPath = @"Cartas.csv"; if (playersPath == null) playersPath = @"Players.csv"; cards = new CardCollection(); cards.ReadFromFile(cardPath); HelperCsv fichero = new HelperCsv(playersPath); Player player; oponentes = new List<Player>(); for (int i = 0; i < fichero.Count; i++) { player = new Player(); player.LoadFromCsv(fichero, i, this.cards); oponentes.Add(player); } }