diff --git a/lib/viral_spiral/canon.ex b/lib/viral_spiral/canon.ex index c3a5e76..62bb388 100644 --- a/lib/viral_spiral/canon.ex +++ b/lib/viral_spiral/canon.ex @@ -11,54 +11,11 @@ defmodule ViralSpiral.Canon do # @card_data "card.ods" # @encyclopedia "encyclopedia.ods" - @true_affinity_opts type: :affinity, veracity: true - @false_affinity_opts type: :affinity, veracity: false - @true_bias_opts type: :bias, veracity: true - @false_bias_opts type: :bias, veracity: false - @true_topical_opts type: :topical, veracity: true - @false_topical_opts type: :topical, veracity: false - @false_conflated_opts type: :conflated, veracity: false - defdelegate load_cards, to: Deck defdelegate create_store(cards), to: Deck - defdelegate create_sets(cards), to: Deck - - def draw_true_affinity_card(deck, tgb, target) do - opts = @true_affinity_opts ++ [tgb: tgb, target: target] - Deck.draw_card(deck, opts) - end - - def draw_false_affinity_card(deck, tgb, target) do - opts = @false_affinity_opts ++ [tgb: tgb, target: target] - Deck.draw_card(deck, opts) - end - - def draw_true_bias_card(deck, tgb, target) do - opts = @true_bias_opts ++ [tgb: tgb, target: target] - Deck.draw_card(deck, opts) - end - - def draw_false_bias_card(deck, tgb, target) do - opts = @false_bias_opts ++ [tgb: tgb, target: target] - Deck.draw_card(deck, opts) - end - - def true_topical_card(deck, tgb) do - opts = @true_topical_opts ++ [tgb: tgb] - Deck.draw_card(deck, opts) - end - - def false_topical_card(deck, tgb) do - opts = @false_topical_opts ++ [tgb: tgb] - Deck.draw_card(deck, opts) - end - - def false_conflated_card(deck, tgb) do - opts = @false_conflated_opts ++ [tgb: tgb] - Deck.draw_card(deck, opts) - end + defdelegate create_sets(cards, opts), to: Deck def encyclopedia() do end diff --git a/lib/viral_spiral/canon/deck.ex b/lib/viral_spiral/canon/deck.ex index 86a6cd3..c6f4186 100644 --- a/lib/viral_spiral/canon/deck.ex +++ b/lib/viral_spiral/canon/deck.ex @@ -2,7 +2,7 @@ defmodule ViralSpiral.Canon.Deck do @moduledoc """ Loads data from .csv files. - Viral Spiral writers use Google Sheet to organize the text content for the game. + Viral Spiral writers use Google Sheet to organize the text content for the game. The current sheet is [here](https://docs.google.com/spreadsheets/d/1070fP6LOjCTfLl7SoQuGA4FxNJ3XLWbzZj35eABizgk/edit?usp=sharing) Each sheet within the sheet is exported as .csv files and stored in the `priv/canon/` directory. This module encodes the conventions used by the writers in the file to generate structured data structures from the csv file. It also converts the structured data into datastructures optimized for the game's requirements.