arcanaCombo method

Arcana? arcanaCombo(
  1. Arcana other
)

Returns the result from the combo of two Arcana. If the combo is not valid, returns null.

  Arcana.fool.arcanaCombo(Arcana.magician) == Arcana.death

Implementation

Arcana? arcanaCombo(Arcana other) {
  for (Map combo in arcana2Combos) {
    if ((combo["source"] as List).contains(this) &&
        (combo["source"] as List).contains(other)) {
      return combo["result"] as Arcana;
    }
  }
  return null;
}