private static Dictionary <ZoneType, List <FootballCard> > GetSquadZones(IFootballDatabase db, string formation) { int[] eachzoneSize = formation.Split('-').Select(int.Parse).ToArray(); var squad = new Dictionary <ZoneType, List <FootballCard> > { { ZoneType.DEF, db.GetCards(eachzoneSize[0]).ToList() }, { ZoneType.MID, db.GetCards(eachzoneSize[1]).ToList() }, { ZoneType.ATT, db.GetCards(eachzoneSize[2]).ToList() } }; return(squad); }
public void AddPlayer(string name, string squadFormation, string squadName) { ValidateFormation(squadFormation); var squad = Squad.GetRandomSquad(db, squadName, squadFormation); players.Add(new Player(name, squad, new Hand(db.GetCards(10).ToList()), ball)); }
public Deck(IFootballDatabase db) { deck = new Stack <FootballCard>(db.GetCards(DECK_SIZE)); }