public mainForm() { InitializeComponent(); currentGameState = new gameState(); currentGameState.PlayedLand = false; knightsRepo = new KnightsRepository(); dragonRepo = new DragonsRepository(); currentGameState.KnightCreatures = knightsRepo.GetKnightCreatures().ToList(); currentGameState.KnightEnchantments = knightsRepo.GetKnightEnchantments().ToList(); currentGameState.KnightInstants = knightsRepo.GetKnightInstants().ToList(); currentGameState.Equipment = knightsRepo.GetKnightEquipment().ToList(); currentGameState.KnightCards.AddRange(currentGameState.KnightCreatures.Cast<ICard>()); currentGameState.KnightCards.AddRange(currentGameState.KnightEnchantments.Cast<ICard>()); currentGameState.KnightCards.AddRange(currentGameState.KnightInstants.Cast<ICard>()); currentGameState.KnightCards.AddRange(currentGameState.Equipment.Cast<ICard>()); currentGameState.KnightCards.AddRange(knightsRepo.GetLands().Cast<ICard>()); currentGameState.DragonCreatures = dragonRepo.GetDragonCreatures().ToList(); currentGameState.DragonEnchantments = dragonRepo.GetDragonEnchantment().ToList(); currentGameState.DragonInstants = dragonRepo.GetDragonInstants().ToList(); currentGameState.DragonCards.AddRange(currentGameState.DragonCreatures.Cast<ICard>()); currentGameState.DragonCards.AddRange(currentGameState.DragonEnchantments.Cast<ICard>()); currentGameState.DragonCards.AddRange(currentGameState.DragonInstants.Cast<ICard>()); currentGameState.DragonCards.AddRange(dragonRepo.GetDragonLands().Cast<ICard>()); currentGameState.DragonCards.AddRange(dragonRepo.GetDragonArtifacts().Cast<ICard>()); currentGameState.AllEnchantments = currentGameState.KnightEnchantments.Concat(currentGameState.DragonEnchantments); }
public void KnightsInstantsPopulateFromFile() { var knightsRepo = new KnightsRepository(); var knightsInstants = knightsRepo.GetKnightInstants(); string x = ""; }