yangyuan/hearthrock

GetMininWastedCost param

Closed this issue · 2 comments

Am I missing something or is the RockId param passed to GetMininWastedCost really unused?

public int GetMininWastedCost(int id)
{
int space = this.Scene.Self.Resources;
List<int> values = new List<int>();
foreach (int value in this.costs.Values)
{
values.Add(value);
}
int ret = Knapsack.ComputeMinWastedSpace(space, values.ToArray());
foreach (RockCard handCard in this.Scene.Self.Cards)
{
if (handCard.CardId == "GAME_005")
{
return Math.Min(ret, Knapsack.ComputeMinWastedSpace(space + 1, values.ToArray()));
}
}
return ret;
}

Yes, it's totally unused.
That is a part of an unfinished feature. I was focusing on other things and didn't get time to finish it. (maybe I should remove it first)

ok, was just curious. came across it while porting the c# bot over to python to have a decent base to work with.