protected virtual void handleMonsterFor(MainDeckDTO mainDeckDto, Card card, string lowerCardType) { handleNonExtraPendulumNormalMonster(mainDeckDto, card, lowerCardType); handleNonExtraPendulumEffectMonster(mainDeckDto, card, lowerCardType); handleRitualMonster(mainDeckDto, card, lowerCardType); handleEffectMonster(mainDeckDto, card, lowerCardType); handleNormalMonster(mainDeckDto, card, lowerCardType); }
/// <inheritdoc /> public MainDeckDTO CreateMainDeckDto(Decklist decklist) { var mainDeckDto = new MainDeckDTO(); foreach (var card in decklist.MainDeck) { var lowerCardType = card.Type.ToLower(); if (lowerCardType.Contains("monster")) { handleMonsterFor(mainDeckDto, card, lowerCardType); } else { handleTraps(mainDeckDto, card, lowerCardType); handleSpells(mainDeckDto, card, lowerCardType); } } return(mainDeckDto); }