public StrategyBase() { // everything initialized to "Stand" pairsStrategy = new ActionToTake[HighestUpcardIndex + 1, HighestUpcardIndex + 1]; softStrategy = new ActionToTake[HighestUpcardIndex + 1, HighestSoftHandRemainder + 1]; hardStrategy = new ActionToTake[HighestUpcardIndex + 1, HighestHardHandValue + 1]; }
public void SetActionForPair(Card.Ranks upcardRank, Card.Ranks pairRank, ActionToTake action) { int upIndex = IndexFromRank(upcardRank); int pairIndex = IndexFromRank(pairRank); pairsStrategy[upIndex, pairIndex] = action; }
private static void LogMissingComponentsFromMemory() { action = new ActionToTake(LogMissing); gameObjects = GetEditableGameObjectsFromMemory(); ActOnMissingComponents(); }
private static void AddMissingComponentsFromAssets() { action = new ActionToTake(AddMissing); gameObjects = GetEditableGameObjectsFromAssets(); ActOnMissingComponents(); }
public void SetActionForHardHand(int upcardRank, int hardTotal, ActionToTake action) { hardStrategy[upcardRank, hardTotal] = action; }
public void SetActionForSoftHand(int upcardRank, int softRemainder, ActionToTake action) { softStrategy[upcardRank, softRemainder] = action; }
public void SetActionForPair(int upcardRank, int pairRank, ActionToTake action) { pairsStrategy[upcardRank, pairRank] = action; }
public ActionWithVotes(int numVotes, ActionToTake action) { NumVotes = numVotes; Action = action; }
public void SetActionForHardHand(Card.Ranks upcardRank, int hardTotal, ActionToTake action) { int upIndex = IndexFromRank(upcardRank); hardStrategy[upIndex, hardTotal] = action; }
public void SetActionForSoftHand(Card.Ranks upcardRank, int softRemainder, ActionToTake action) { int upIndex = IndexFromRank(upcardRank); softStrategy[upIndex, softRemainder] = action; }