private void InitDeck(SkillCardDeck leadershipDeck, SkillCardDeck tacticsDeck, SkillCardDeck pilotingDeck, SkillCardDeck engineeringDeck, SkillCardDeck politicsDeck) { if (leadershipDeck.DeckColor != SkillCardColor.Leadership) { throw new ArgumentException("Leadership deck input is not actually a leadership deck."); } if (leadershipDeck.DeckColor != SkillCardColor.Tactics) { throw new ArgumentException("Tactics deck input is not actually a tactics deck."); } if (leadershipDeck.DeckColor != SkillCardColor.Piloting) { throw new ArgumentException("Piloting deck input is not actually a piloting deck."); } if (leadershipDeck.DeckColor != SkillCardColor.Engineering) { throw new ArgumentException("Engineering deck input is not actually an engineering deck."); } if (leadershipDeck.DeckColor != SkillCardColor.Politics) { throw new ArgumentException("Politics deck input is not actually a politics deck."); } LeadershipDeck = leadershipDeck; TacticsDeck = tacticsDeck; PilotingDeck = pilotingDeck; EngineeringDeck = engineeringDeck; PoliticsDeck = politicsDeck; }
/// <summary> /// Initializes the deck. /// </summary> /// <param name="leadershipDeck">The leadership deck.</param> /// <param name="tacticsDeck">The tactics deck.</param> /// <param name="pilotingDeck">The piloting deck.</param> /// <param name="engineeringDeck">The engineering deck.</param> /// <param name="politicsDeck">The politics deck.</param> /// <exception cref="System.ArgumentException"> /// Leadership deck input is not actually a leadership deck. /// or /// Tactics deck input is not actually a tactics deck. /// /// Piloting deck input is not actually a piloting deck. /// or /// Engineering deck input is not actually an engineering deck. /// or /// Politics deck input is not actually a politics deck. /// </exception> private void InitDeck(SkillCardDeck leadershipDeck, SkillCardDeck tacticsDeck, SkillCardDeck pilotingDeck, SkillCardDeck engineeringDeck, SkillCardDeck politicsDeck) { if (leadershipDeck == null || tacticsDeck == null || pilotingDeck == null || engineeringDeck == null || politicsDeck == null) { return; } if (leadershipDeck.DeckColor != SkillCardColor.Leadership) { throw new ArgumentException("Leadership deck input is not actually a leadership deck."); } if (tacticsDeck.DeckColor != SkillCardColor.Tactics) { throw new ArgumentException("Tactics deck input is not actually a tactics deck."); } if (pilotingDeck.DeckColor != SkillCardColor.Piloting) { throw new ArgumentException("Piloting deck input is not actually a piloting deck."); } if (engineeringDeck.DeckColor != SkillCardColor.Engineering) { throw new ArgumentException("Engineering deck input is not actually an engineering deck."); } if (politicsDeck.DeckColor != SkillCardColor.Politics) { throw new ArgumentException("Politics deck input is not actually a politics deck."); } LeadershipDeck = leadershipDeck; TacticsDeck = tacticsDeck; PilotingDeck = pilotingDeck; EngineeringDeck = engineeringDeck; PoliticsDeck = politicsDeck; Deck = new List <SkillCard>(); Discarded = new List <SkillCard>(); }
public DestinyDeck(ILog logger, SkillCardDeck leadershipDeck, SkillCardDeck tacticsDeck, SkillCardDeck pilotingDeck, SkillCardDeck engineeringDeck, SkillCardDeck politicsDeck) : base(logger) { InitDeck(leadershipDeck, tacticsDeck, pilotingDeck, engineeringDeck, politicsDeck); }