Module: RuneterraCards

Defined in:
lib/runeterra_cards.rb,
lib/runeterra_cards/card.rb,
lib/runeterra_cards/cost.rb,
lib/runeterra_cards/errors.rb,
lib/runeterra_cards/version.rb,
lib/runeterra_cards/card_set.rb,
lib/runeterra_cards/factions.rb,
lib/runeterra_cards/metadata.rb,
lib/runeterra_cards/card_metadata.rb

Overview

TODO:

could be more obvious what’s wrong when you call == on the wrong class e.g. a number

Defined Under Namespace

Classes: Base32Error, Card, CardMetadata, CardSet, Cost, DeckCodeParseError, EmptyInputError, Metadata, MetadataLoadError, UnrecognizedFactionError, UnrecognizedVersionError

Constant Summary collapse

SUPPORTED_VERSION =

The version of deck encoding supported

5
VERSION =

The version of this library

'0.7.0'
FACTION_IDENTIFIERS_FROM_INT =

An map from integer faction identifiers to their two-letter identifiers

Examples:

FACTION_IDENTIFIERS_FROM_INT[2] #=> "IO"

Returns:

  • (Hash<Fixnum,String>)
{
  0 => 'DE',
  1 => 'FR',
  2 => 'IO',
  3 => 'NX',
  4 => 'PZ',
  5 => 'SI',
  6 => 'BW',
  7 => 'SH',
  9 => 'MT',
  10 => 'BC',
  12 => 'RU',
}.freeze
FACTION_INTS_FROM_IDENTIFIER =

A map from two-letter Faction identifiers to their integer identifiers

Examples:

FACTION_INTS_FROM_IDENTIFIER["IO"] #=> 2

Returns:

  • (Hash<String,Fixnum>)
{
  'DE' => 0,
  'FR' => 1,
  'IO' => 2,
  'NX' => 3,
  'PZ' => 4,
  'SI' => 5,
  'BW' => 6,
  'SH' => 7,
  'MT' => 9,
  'BC' => 10,
  'RU' => 12,
}.freeze