public static void GetSummonsCombination(List <Card> summons, int[] data, int start, int end, int index, int numCards) { if (index == numCards) { SummonGroup newSummonGroup = new SummonGroup(); for (int i = 0; i < numCards; i++) { var card = summons[data[i]]; if (!newSummonGroup.AddCard(card)) { return; //cannot summon } } newSummonGroup.Print(); groups.Add(newSummonGroup); return; } for (int i = start; i <= end && end - i + 1 >= numCards - index; i++) { data[index] = i; GetSummonsCombination(summons, data, i + 1, end, index + 1, numCards); } }
public static void CleanUp() { Drafting.CleanUp(); Action.CleanUp(); Strategy.CleanUp(); Player.CleanUp(); MonsterTrading.CleanUp(); SummonGroup.CleanUp(); }
public static void StartSimulation() { var start = Timer.TickCount; FindGroupSimulation(Player.enemy); Console.Error.WriteLine("Enemy Trade Groups: " + Player.enemy.tradeGroups.Count); FindGroupSimulation(Player.me); Console.Error.WriteLine("My Trade Groups: " + Player.me.tradeGroups.Count); SummonGroup.GetSummons(); FindMyBestTradeGroup(); Console.Error.WriteLine("End Simulation: " + (Timer.TickCount - start)); }
public static bool PossibleSummonSelection(SimulationGroup myGroup, SummonGroup summonGroup) { if (myGroup.simulatedManaCost + summonGroup.simulatedManaCost > Player.me.mana) { return(false); } /*foreach (var target in summonGroup.) * { * if (enemyGroup.simulationCards.Contains(target)) * { * return false; * } * }*/ return(true); }
public static void BestSummon(SummonGroup group) { foreach (var card in group.myCards) { if (Player.me.numCardsOnBoard >= 6) { return; } if (card.type == CardType.Creature) { if (Player.me.mana >= card.cost) { var newAction = new Action(card); newAction.ApplyAction(); } } } }